-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathKaun Banega Crorepati (KBC).py
More file actions
509 lines (475 loc) · 15.5 KB
/
Kaun Banega Crorepati (KBC).py
File metadata and controls
509 lines (475 loc) · 15.5 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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
import random
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# Inroductions....
intro = print("Kaun Banega Crorepati (KBC)".center(45)
)
intro1 = print("Welcome to the Kaun Banega Crorepati (KBC) Game".center(12))
print()
#Entry intruduction...
name = input("what is Your Name-\n")
greeting = print("Hello,",name,"Welcome to the Kaun Banega Crorepati (KBC) Game")
# end ..
print()
# want to enter or not ??
st1 = print("Start the Game OR Go Back the Game-")
st = input()
if (st == "Start"):
print("Lets Go!!")
else:
print("Thank You for joining!!")
breakpoint()
# Instructions...
print()
print("Instructions:-")
print()
print("All question are compulsory")
print("Their are total 10 questions")
print("Total prize are 10 crore")
print("All question have points and price will be given accordingly.")
print()
# Read out or next...
st2 = input("Continue ? Yes or No\n")
print()
if (st2 == "No"):
breakpoint()
else:
ConnectionRefusedError
print()
# Set the prize pool based on score
score = 0
# Set the total score
prize = 0
total_score = score # 100 score
total_prize = prize # 100 prize
questions = [
{
"question": "Q - Current Railway Minister of India is -",
"options": ["A. Mamta Banarjee", "B. Ram Vilash", "C. Ashwini vaishnaw", "D. Piyush Goyal"],
"answer": "C"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 100000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
prize -= 50000
# Ask if the user wants to continue
st3 = input("Do you want to continue this game? Yes or No")
# Check if the total score reaches the prize pool
prize_amount = score
if (st3 == "Yes"):
prize_amount = prize
print("Your final score is:", score)
else:
print("Your totsl score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs ")
breakpoint()
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
for _ in range(1):
for _ in range(1):
continue
continue
questions1 = [
{
"question": "Q. Which god is also known as 'Gauri Nandan'?" ,
"options": ["A. Agni" ,"B.Indra" ,"C. Hanuman", "D. Ganesha"],
"answer": "D"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions1)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 200000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
prize -= 50000
# Ask if the user wants to continue
st4 = input("Do you want to continue this game? Yes or No")
# Check if the total score reaches the prize pool
if (st4 == "Yes" ):
prize_amount = prize
print("Your final score is:", score)
else:
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
total_score = prize
breakpoint
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
total_score = prize
for _ in range(1):
for _ in range(1):
continue
continue
questions2 = [
{
"question": "Q. What does not grow on tree according to a popular Hindi saying?" ,
"options": ["A. Money" , "B. Flowers" , "C. Leaves" , "D. Fruits"],
"answer": "A"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions2)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 300000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
prize -= 50000
# Ask if the user wants to continue
st5 = input("Do you want to continue this game? Yes or No\n")
# Check if the total score reaches the prize pool
if (st5 == "Yes" ):
print("Your final score is:", score)
else:
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
total_score = prize
breakpoint()
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
total_score = prize
for _ in range(1):
for _ in range(1):
continue
continue
questions3 = [
{
"question": "Q. Which city is known as the Pink City of India?" ,
"options": ["A. Banglore" , "B. Maysore" , "C. Jaipur" , "D. Kochi" ],
"answer": "C"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions3)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 400000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
prize -= 50000
# Ask if the user wants to continue
st6 = input("Do you want to continue this game? Yes or No")
# Check if the total score reaches the prize pool
if (st6 == "Yes" ):
print("Your final score is:", score)
else:
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
breakpoint()
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
total_score = prize
for _ in range(1):
for _ in range(1):
continue
continue
questions4 = [
{
"question": "Q. Who wrote India's National Anthem?",
"options": ["A. Rabindranath Tagore" , "B. Lal Bahadur Shastri" , "C. Chetan Bhagat" , "D. RK Narayan" ],
"answer": "A"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions4)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 500000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
prize -= 50000
# Ask if the user wants to continue
st7 = input("Do you want to continue this game? Yes or No\n")
# Check if the total score reaches the prize pool
if (st7 == "Yes" ):
print("Your final score is:", score)
else:
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
total_score = prize
breakpoint()
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
for _ in range(1):
for _ in range(1):
continue
continue
questions5 = [
{
"question":"Q. How many major religions are there in India?" ,
"options": ["A. 6", "B. 7", "C. 8","D. 9" ],
"answer": "C"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions5)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 1000000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
prize -= 100000
# Ask if the user wants to continue
st8 = input("Do you want to continue this game? Yes or No\n")
# Check if the total score reaches the prize pool
if (st8 == "Yes" ):
print("Your final score is:", score)
else:
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize}Rs")
total_score = prize
breakpoint()
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
for _ in range(1):
for _ in range(1):
continue
continue
questions6 = [
{
"question": "Q. When is the National Hindi Diwas celebrated?",
"options": ["A. 13 September" ,"B. 14 September" ,"C. 14 July" ,"D. 15 August"],
"answer": "B"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions6)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 2000000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
score -= 100000
# Ask if the user wants to continue
st9 = input("Do you want to continue this game? Yes or No\n")
# Check if the total score reaches the prize pool
if (st9 == "Yes" ):
print("Your final score is:", score)
else:
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize}Rs")
total_score = prize
breakpoint()
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
for _ in range(1):
for _ in range(1):
continue
continue
questions7 = [
{
"question": "Q. Which country is the largest producer of coffee in the world?",
"options": ["A. Brazil", "B. Colombia", "C. Vietnam", "D. China"],
"answer": "A"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions7)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 13000000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
prize -= 4500000
# Ask if the user wants to continue
st10 = input("Do you want to continue this game? Yes or No\n")
# Check if the total score reaches the prize pool
if (st10 == "Yes" ):
print("Your final score is:", score)
else:
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs ")
total_score = prize
breakpoint()
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
for _ in range(1):
for _ in range(1):
continue
continue
questions8 = [
{
"question":"Q. Where is India Gate located?" ,
"options": ["A. Punjab", "B. Aagra" ,"C. Mumbai", "D. New Delhi"],
"answer": "D"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions8)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 12500000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
prize -= 4900000
# Ask if the user wants to continue
st11 = input("Do you want to continue this game? Yes or No\n")
# Check if the total score reaches the prize pool
if (st11 == "Yes" ):
print("Your final score is:", score)
else:
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
total_score = prize
breakpoint()
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
for _ in range(1):
for _ in range(1):
continue
continue
questions9 = [
{
"question": "Q. Who wrote Vande Mataram?",
"options": ["A. Sarat Chandra Chattopadhyay", "B. Rabindranath Tagore" ,"C. Bankim Chandra Chatterjee" ,"D.Ishwar Chandra Vidyasagar"],
"answer": "C"
},
# Add more questions here...
]
# Randomly select a question
selected_question = random.choice(questions9)
# Display the selected question
print(selected_question["question"])
for option in selected_question["options"]:
print(option)
# Get user's input for the selected question
user_answer = input("Enter your answer (A/B/C/D): ")
# Check if the user's answer is correct
if user_answer == selected_question["answer"]:
print("Correct!")
score += 10
prize += 70000000
else:
print("Wrong! The correct answer is:", selected_question["answer"])
score -= 5
prize -= 8000000
print("Your final score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} Rs")
total_score = prize
print()
# Set the prize pool based on score..
# This this a total scored basesed on game...
# And this is total prize cash based on game....
"""
prize_pool = {
100: 100000, # 1 lakh
200: 200000, # 2 lakhs
300: 300000, # 3 lakhs
400: 400000, # 4 lakhs
500: 500000, # 5 lakhs
600: 1000000, # 10 lakhs
700: 2000000, # 20 lakhs
800: 3000000, # 30 lakhs
900: 4000000, # 40 lakhs
100: 7000000, # 7 crores
}
"""
print("Result Are Here:")
print()
print("Your Total score is:", score)
print(f"Congratulations! You have won the prize pool of {prize} crores")
print()
print("Thank You!!")
print("For, playing this game!!")
print()
# Feedback!!!
FROM_EMAIL = input("Do you like this (KBC) game, you can write your email id!!\n")
MESSAGE = input("Feedback!!-\n ")
print("Thank You , see you again!!!")