-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex 3 (KBC).py
139 lines (134 loc) · 3.88 KB
/
ex 3 (KBC).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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# # Create a program capable of displaying questions to the user like KBC.
# # Use List data type to store the questions and their correct answers.
# # Display the final amount the person is taking home after playing the game.
# kbcque=['Who is the popular youtuber in India']
# O=["1-Bhuvan Bham\n","2-Vishal singh\n", "3-Fukra Insaan\n","4-Triggered insaan\n"]
# # L=[1,3,4,5]
# # print(L.index[5])
# # print(type(O))
# print(O.index[2-Vishal singh])
# print(kbcque)
# # print(O)
# # Res=(input("Enter the option no.:-"))
# # if(Res==ans):
# # print("Correct answer")
# # else:
# # print("Wrong answer")
questions = [[ "Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
[
"Which language was used to create fb?", "Python", "French", "JavaScript",
"Php", "None", 4
],
]
levels = [1000, 2000, 3000, 5000, 10000, 20000, 40000, 80000, 160000, 320000]
money = 0
for i in range(0, len(questions)):
question = questions[i]
print(f"\n\nQuestion for Rs. {levels[i]}")
print(f"a. {question[1]} b. {question[2]} ")
print(f"c. {question[3]} d. {question[4]} ")
reply = int(input("Enter your answer (1-4) or 0 to quit:\n" ))
if (reply == 0):
money = levels[i-1]
break
if(reply == question[-1]):
print(f"Correct answer, you have won Rs. {levels[i]}")
if(i == 4):
money = 10000
elif(i == 9):
money = 320000
elif(i == 14):
money = 10000000
else:
print("Wrong answer!")
break
print(f"Your take home money is {money}")