-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkbc.py
More file actions
41 lines (35 loc) · 1.62 KB
/
kbc.py
File metadata and controls
41 lines (35 loc) · 1.62 KB
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
31
32
33
34
35
36
37
38
39
40
41
ques = [
["capital of India", "Delhi", "Mumbai", "Jaipur", "Kolkata", 1],
["largest state in India", "Maharashtra", "Rajasthan", "Uttar Pradesh", "Madhya Pradesh", 2],
["currency of Japan", "Yen", "Won", "Dollar", "Euro", 1],
["capital of USA", "New York", "Washington DC", "Los Angeles", "Chicago", 2],
["national animal of India", "Tiger", "Lion", "Elephant", "Peacock", 1],
["longest river in the world", "Nile", "Amazon", "Ganges", "Yangtze", 1],
["largest desert in the world", "Sahara", "Gobi", "Kalahari", "Atacama", 1],
["smallest planet in the solar system", "Mercury", "Venus", "Mars", "Pluto", 1],
["author of 'Harry Potter'", "J.K. Rowling", "J.R.R. Tolkien", "George R.R. Martin", "Agatha Christie", 1],
["father of the Indian Constitution", "Jawaharlal Nehru", "B.R. Ambedkar", "Mahatma Gandhi", "Sardar Patel", 2],
]
amt = [1000, 2000, 3000, 5000, 10000, 20000, 40000, 80000, 160000, 320000]
m = 0
for i in range(len(ques)):
q = ques[i]
print(f"Question for {amt[i]}:")
print(f"{q[0]}")
print(f"a. {q[1]} b. {q[2]}")
print(f"c. {q[3]} d. {q[4]}")
answer = int(input("Enter your answer (1-4) or 0 to quit: "))
if answer == 0:
print("You chose to quit the game.")
break
if answer == q[5]:
m += amt[i]
print(f"Correct answer! You have won {amt[i]}")
if i == 4:
m = 10000
elif i == 9:
m = 32000
else:
print("Wrong answer!")
break
print(f"Your total take-home money is {m}")