-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathbase.py
30 lines (22 loc) · 1.37 KB
/
base.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import random
def generate_state_name():
state_prefixes = ["Andhra", "Arunachal", "Assam", "Bihar", "Chhattisgarh", "Goa", "Gujarat",
"Haryana", "Himachal", "Jharkhand", "Karnataka", "Kerala", "Madhya", "Maharashtra",
"Manipur", "Meghalaya", "Mizoram", "Nagaland", "Odisha", "Punjab", "Rajasthan",
"Sikkim", "Tamil", "Telangana", "Tripura", "Uttar", "Uttarakhand", "West"]
state_suffixes = [" Pradesh", " Pradesh", " Pradesh", " Nadu", " Pradesh", " Bengal", " Pradesh", " Pradesh",
" Pradesh", " Pradesh", " Pradesh", " Pradesh", " Pradesh", " Pradesh", " Pradesh",
" Pradesh", " Pradesh", " Pradesh", " Pradesh", " Pradesh", " Pradesh", " Pradesh",
" Pradesh", " Nadu", " Pradesh", " Pradesh", " Pradesh", " Pradesh"]
state_name = random.choice(state_prefixes) + random.choice(state_suffixes)
return state_name
if __name__ == "__main__":
num_names = int(
input("Enter the number of unique state names you want to generate: "))
unique_state_names = set()
while len(unique_state_names) < num_names:
state_name = generate_state_name()
unique_state_names.add(state_name)
print("\nGenerated Unique State Names:")
for state_name in unique_state_names:
print(state_name)