-
Notifications
You must be signed in to change notification settings - Fork 1
/
sauravworld.py
560 lines (470 loc) · 22.4 KB
/
sauravworld.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
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
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
print( " WELCOME TO SAURAV's WORLD ")
print "\n"
name=raw_input("What is your name ?" )
print " INTRODUCTION "
print
print " In this world you can play the diffrent kinds of game."
print " You can also do the calculation work "
print " Here you will be provided with certain options "
print " which will help you to decide in wich field you want to go."
print
print " So let enter in Saurav's World...."
print
print " Press 1 to open the door and enter "
print
a=int(raw_input(" Enter '1' To open The door:"))
if a==1:
print
print " Welcome ",name ," TO Saurav's world"
print
def world(x):
print " Press '1' for Paying game "
print
print " Press '2' for calculation "
print
print " Press '3' for Exit from SAURAV's WORLD "
print
n=1
print world(2)
while n>0:
opt=int(raw_input(" Enter your choice :"))
print
if opt==1:
print " Press '1' for Playing Hangman "
print
print " Press '2' for Playing Guessing Game "
print
print " Press '3' for Playing KBC "
print
b=int(raw_input(" Enter your choice:"))
print
if b==1:
print " Welcome to Hangman "
print
def sau(x):
print " For instruction press '1' "
print " For Playing Hangman press '2' "
print " Foe any help press '3' "
print sau(2)
print
print " hello",name
m=1
while m>0:
choice=int(raw_input("enter your choice:"))
if choice==1:
print " Instructions "
print " Computer will randomly select a word and you have to guess that word "
print " Thier will be two parts in the game you have to select any one"
print " Frist type will select a word releted to Litrature "
print " Secound will select word releted to computer "
print
print sau(2)
if choice==2:
import random
print " press '1' for Computer related words "
print " press '2' for Litrature related words "
print
opt=int(raw_input("enter your choice:"))
word=" "
if opt==1:
num=random.randint(1,4)
if num==1:
word="moniter"
print "hint"
print " a hardware which display the output"
if num==2:
word="python"
print"hint"
print" a programing language "
if num==3:
word="motherboard"
print"hint"
print"main part of CPU "
if num==4:
word="linux"
print"hint"
print"A operating System"
if opt==2:
num=random.randint(5,8)
if num==5:
word="petard"
print"hint"
print" A small engine of war for breaking a barriers"
if num==6:
word="petal"
print" hint"
print" A single leaflet of a corolla of a flower"
if num==7:
word="vintage"
print "hint"
print" the time of gathering the crop of grapes"
if num==8:
word="vigorous"
print"hint"
print" Full of physical strenght"
turn=7
s=" "
while turn>0:
failed=0
for chr in word:
if chr in s:
print chr
else:
print "_",
failed=failed+1
if failed==0:
print
print name,"You won the game....."
print " For exit press '9' or press any other number key to go on main screen "
print " OR press '5' for exit from SAURAV's WORLD"
num1=int(raw_input(" Enter your choice "))
if num1==9:
m=m-1
print " Thanks for visiting...."
print"\n"
print world(2)
break
if num1==5:
print " Thanks For Visiting In SAURAV's WORLD "
n=n-1
m=m-1
break
else:
print sau(2)
break
print
guess=raw_input("Enter a charecter:")
s=s+guess
if guess not in word:
print "Wrong"
turn=turn-1
print
print " you have left with",turn," more turn"
if turn==0:
print name," You loose the game....."
print " Try Again "
print " For exit press '9' or any other number key to go again on play screen "
print " OR press 5 for exit from SAURAV's WORLD "
num1=int(raw_input(" Enter your choice "))
if num1==9:
m=m-1
print " Thanks for visiting...."
print"\n"
print world(2)
if num1==5:
print " Thanks For visiting SAURAV's WORLD "
else:
print sau(2)
if choice ==3:
print " The hint will be displayed on the screen while playing"
print " acoording to that hint you have to guess that word"
print " And one by one you have to guess a charecter "
print
print sau(2)
if b==2:
print " Welcome to guessing game..."
print"\n"
print " Hints"
print"\n"
print " You have to guess a number if your guess matched with computers number than you will won the game othe wise you will loose the game\
you will be provided with 5 chance to guess that number.."
print"\n"
print " Hello ",name
import random
num=random.randint(100,200)
turn=1
while turn<6:
print
guess=int(raw_input("enter your guess between 100 to 200:"))
print
if guess==num:
print
print " You Won the Game....",name
print"\n"
print world(2)
break
if guess>num:
print
print " the number is too high "
else:
print
print " the number is too low "
turn=turn+1
if turn==6:
print"\n"
print " You loose the game....",name
print " The number was :",num
print"\n"
print world(2)
if b==3:
print "***** WELLCOME TO KBC *****"
print "\n"
print "Hello ",name
print
print "Hints:"
print
print"You Will be asked with 7 question containg 4 options.\
you have to only tell the correct option number.\
correct answer will give you Rs 25,000 & worng answer will reduce Rs 10,000."
print"\n"
print " so lets start the game ...."
print
print " press '7' to start the game "
print
start=int(raw_input("Enter your choice:"))
if start==7:
point=0
import time
print " So the frist question is on your screen "
time.sleep(1)
print
q1=''' (Q-1) Grand Central Terminal, Park Avenue, New York is the world's:
(a) largest railway station
(b) highest railway station
(c) longest railway station
(d) None of the above '''
print q1
print
ans=raw_input(" Enter your option :")
if ans=="a":
print
print " Your answer is correct"
print
point+=25000
print " Your total Money is:",point,"Rs"
else:
print
print " Your answer is wrong"
print
point-=10000
print " your total Money is :",point," Rs"
print
print " So the Second question is on your screen "
time.sleep(1)
print
q2=''' (Q-2) Entomology is the science that studies :
(a) Behavior of human beings
(b) Insects
(c) The origin and history of technical and scientific terms
(d) The formation of rocks '''
print q2
print
ans=raw_input(" Enter your option :")
if ans=="b":
print
print " Your answer is correct"
print
point+=25000
print " Your total Money is:",point,"Rs"
else:
print
print " Your answer is wrong"
print
point-=10000
print " your total Money is :",point," Rs"
print
print " So the Third question is on your screen "
time.sleep(1)
print
q3=''' (Q-3) FFC stands for :
(a) Foreign Finance Corporation
(b) Film Finance Corporation
(c) Federation of Football Council
(d) None of the above '''
print q3
print
ans=raw_input(" Enter your option :")
if ans=="b":
print
print " Your answer is correct"
print
point+=25000
print " Your total Money is:",point,"Rs"
else:
print
print " Your answer is wrong"
print
point-=10000
print " your total Money is :",point," Rs"
print
print " So the Fourth question is on your screen "
time.sleep(1)
print
q4=''' (Q-4) Galileo was an Italian astronomer who :
(a) developed the telescope
(b) discovered four satellites of Jupiter
(c) discovered that the movement of pendulum produces a regular time measurement
(d) All of the above '''
print q4
print
ans=raw_input(" Enter your option :")
if ans=="d":
print
print " Your answer is correct"
print
point+=25000
print " Your total Money is:",point,"Rs"
else:
print
print " Your answer is wrong"
print
point-=10000
print " your total Money is :",point," Rs"
print
print " So the Fiveth question is on your screen "
time.sleep(1)
print
q5=''' (Q-5) First human heart transplant operation conducted by Dr. Christian Bernard on Louis Washkansky, was conducted in :
(a) 1967
(b) 1968
(c) 1958
(d) 1922 '''
print q5
print
ans=raw_input(" Enter your option :")
if ans=="a":
print
print " Your answer is correct"
print
point+=25000
print " Your total Money is:",point,"Rs"
else:
print
print " Your answer is wrong"
print
point-=10000
print " your total Money is :",point," Rs"
print
print " So the Sixth question is on your screen "
time.sleep(1)
print
q6=''' (Q-6) Epsom (England) is the place associated with :
(a) Horse racing
(b) Polo
(c) Shooting
(d) Snooker '''
print q6
print
ans=raw_input(" Enter your option :")
if ans=="a":
print
print " Your answer is correct"
print
point+=25000
print " Your total Money is:",point,"Rs"
else:
print
print " Your answer is wrong"
print
point-=10000
print " your total Money is :",point," Rs"
print
print " So the Seventh question is on your screen "
time.sleep(1)
print
q7=''' (Q-7) Fastest shorthand writer was :
(a) Dr. G. D. Bist
(b) J.R.D. Tata
(c) J.M. Tagore
(d) Khudada Khan '''
print q7
print
ans=raw_input(" Enter your option :")
if ans=="a":
print
print " Your answer is correct"
print
point+=25000
print " Your total Money is:",point,"Rs"
else:
print
print " Your answer is wrong"
print
point-=10000
print " your total Money is :",point," Rs"
print
print " Congratulation ",name," You Finally Won ",point,"Rs"
print"\n"
print world(2)
if opt==2:
m=1
while m>0:
print
print " press '1' For calculating the squar root of any number "
print
print " press'2' For printing table of any number "
print
print " press '3' For findind the square of any number "
print
print " Press '4' for exit "
print
b=int(raw_input("Enter your choice:"))
if b==1:
print
print " You have to enter the the number whoes square root you want to find "
print
num=float(raw_input("Enter the number:"))
print
import math
a=math.sqrt(num)
print
print " The square root is:",a
print
print " press 9 for Exit or press any other number key to go again on calculation screen"
again=int(raw_input("Enter your choice:"))
print
if again==9:
print " Thanks for visiting ...."
print
print world(2)
m=m-1
break
if b==2:
print
print" You have to enter the number whoes table you want to print "
num=int(raw_input(" Enter the number:"))
print
print " The table of the number is :-"
print"\n"
for a in range (1,11):
b=num*a
print
print num,"X",a,"=",b
print
print " press 9 for Exit or press any other number key to go again on calculation screen"
again=int(raw_input("Enter your choice:"))
print
if again==9:
print " Thanks for visiting ...."
print
print world(2)
m=m-1
break
if b==3:
print
print " You have to enter the number whoes square you want to find"
num=float(raw_input("Enter the number:"))
print
a=num**2
print" The square of the number is:",a
print
print " press 9 for Exit or press any other number key to go again on calculation screen"
again=int(raw_input("Enter your choice:"))
print
if again==9:
print " Thanks for visiting ...."
print
print world(2)
m=m-1
break
if b==4:
print
print " Thanks for visiting "
print
print world(2)
m=m-1
break
if opt==3:
print " Thanks for visiting in SAURAV's WORLD "
n=n-1
break