-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
166 lines (164 loc) · 7.02 KB
/
main.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
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
#import random and time module
import random
import time
#print * 80 times
for i in range(80):
print("*",end="")
time.sleep(0)
print()
print("\t\t\t Welcome to")
print("\t\t\tKaun Banega Crorepati")
for i in range(80):
print("*",end="")
time.sleep(0)
print()
a=input("\tEnter Your Name - ")
for i in range(80):
print("*",end="")
time.sleep(0)
print()
print("\n\t\tOK ",a," Let's Start The Game")
time.sleep(1)
questions=["Who is The Prime Minister of India","In Which Country Area 51 is Located","Which one is the largest Continent in the world","What is the Latest Version of Windows Since 2019","Which One of These Is not a Software Company","How Many MB Makes 1 GB","Facebook Was Firstly Developed By","Founder of Apple is","_________ is one of The Founder of Google","BIGG BOSS season 13 Starts in ____ & ends in _____","Apple's Laptop is Also Known as","First Apple Computer is Known as","Joystick is used For","____________ is used to Encrypt Drives in Computer"]
answer=["Narendra Modi","United States","Asia","Windows 10","Honda","1024","Mark Zuckenberg","Steve Jobs","Larry Page","2019 - 2020","Macbook","Mactonish","Playing Games","Bitlocker"]
wronganswers=[["Amit Shah","Aditya Nath Yogi","Azhar Ansari"],["India","Africa","Iraq"],["South Africa","North America","Europe"],["Windows 7","Windows 8","Windows 11"],["Oracle","Microsoft","Google"],["10024","1004","2024"],["Bill Gates","Larry Page","Azhar Ansari"],["Azhar Ansari","Charles Babbage","Sundar Pichai"],["Larry Hensberg","Sunder Pichai","Bill Gates"],["2020 - 2021","Not Starts Now","2018 - 2019"],["ThinBook","Notebook","ChromeBook"],["Apple v.1","Apple Computer","Appbook"],["Giving output command","Shutting down Computer","Log off Computer"],["KeyGuard","Windows Secure","No Software like this"]]
attempquestion=[]
count=1
amount=0
while True:
while True:
selectquestion=random.choice(questions)
if selectquestion in attempquestion:
pass
elif selectquestion not in attempquestion:
attempquestion.append(selectquestion)
questionindex=questions.index(selectquestion)
correctanswer=answer[questionindex]
break
optionslist=[]
inoptionlist=[]
optioncount=1
while optioncount<4:
optionselection=random.choice(wronganswers[questionindex])
if optionselection in inoptionlist:
pass
elif optionselection not in inoptionlist:
optionslist.append(optionselection)
inoptionlist.append(optionselection)
optioncount+=1
optionslist.append(correctanswer)
alreadydisplay=[]
optiontodisplay=[]
a1=True
while a1:
a=random.choice(optionslist)
if a in alreadydisplay:
pass
else:
alreadydisplay.append(a)
optiontodisplay.append(a)
a1=not True
a1=True
while a1:
b=random.choice(optionslist)
if b in alreadydisplay:
pass
else:
alreadydisplay.append(b)
optiontodisplay.append(b)
a1=not True
a1=True
while a1:
c=random.choice(optionslist)
if c in alreadydisplay:
pass
else:
alreadydisplay.append(c)
optiontodisplay.append(c)
a1=not True
a1=True
while a1:
d=random.choice(optionslist)
if d in alreadydisplay:
pass
else:
alreadydisplay.append(d)
optiontodisplay.append(d)
a1=not True
right_answer=""
if correctanswer==a:
right_answer="a"
elif correctanswer==b:
right_answer="b"
elif correctanswer==c:
right_answer="c"
elif correctanswer==d:
right_answer="d"
print("--------------------------------------------------------------------------------------------")
print("\t\t\tAmount Win - ",amount)
print("--------------------------------------------------------------------------------------------")
time.sleep(1)
print("\n\t\tQuestion ",count," on your Screen")
print("--------------------------------------------------------------------------------------------")
time.sleep(1)
print(" | Question - ",selectquestion)
print("--------------------------------------------------------------------------------------------")
print("\t-----------------------------------------------------------------------------")
time.sleep(1)
print("\t| A. ",a)
print("\t-----------------------------------------------------------------------------")
time.sleep(1)
print("\t| B. ",b)
print("\t-----------------------------------------------------------------------------")
time.sleep(1)
print("\t| C. ",c)
print("\t-----------------------------------------------------------------------------")
time.sleep(1)
print("\t| D. ",d)
print("\t-----------------------------------------------------------------------------")
useranswer=input("\t\tEnter Correct Option\t or \t press Q to quit.\n\t\t\t...").lower()
if useranswer==right_answer:
if count==1:
amount=1000
elif count==2:
amount=2000
elif count==3:
amount=5000
elif count==4:
amount=10000
elif count==5:
amount=40000
elif count==6:
amount=80000
elif count==7:
amount=160000
elif count==8:
amount=320000
elif count==9:
amount=640000
elif count==10:
amount=1500000
print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
print("*********************************************************************************")
print("\t\t\t \\\\\\\\\\ Congratulations! //////////")
print("\t\t\t|||||||||| You Won The Game ||||||||||")
print("*********************************************************************************")
print("\n\n\t\t You Won Rs. ",amount)
print()
break
print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
print("*********************************************************************************")
print("\t\t\t \\\\\\\\\\ Congratulations! //////////")
print("\t\t\t|||||||||| Right Answer ||||||||||")
print("*********************************************************************************")
count+=1
elif useranswer=="q":
print("\n\n\t\t You Won Rs. ",amount)
break
else:
print("*********************************************************************************")
print("\t\t\tWrong Answer")
print("*********************************************************************************")
print("\n\n\t\t \tYou Won Rs. ",amount)
print("*********************************************************************************")
break