|
6 | 6 |
|
7 | 7 | while True:
|
8 | 8 | print('_________Welcome to 2D game with Python Programming_________')
|
9 |
| - # exit() |
10 | 9 | press1 = int(input('______Press 1 for RULES OR 2 to start Game!____'))
|
11 | 10 | if press1 == 1:
|
12 | 11 | print(' >Your Age must be greater than or equal 17! ')
|
|
18 | 17 | print('Lets Start!')
|
19 | 18 | clientName = input('Type your name : at least 3 words')
|
20 | 19 | clientAge = int(input('Type your age : at least 17year!'))
|
| 20 | + print('_____you entered___', len(clientName)) |
| 21 | + print('_____you entered___', clientAge) |
21 | 22 | if len(clientName) < 3:
|
22 | 23 | print('Your Name must be aleast 3Characters!')
|
| 24 | + exit() |
23 | 25 | if clientAge < 17:
|
24 | 26 | print('Your Age must be aleast 17!')
|
25 | 27 | exit()
|
26 |
| - if len(clientName) > 3 and clientAge >= 17: |
| 28 | + while len(clientName) >= 3 and clientAge >= 17: |
27 | 29 | print('You can play game Now. ...')
|
28 | 30 | print('Welcome', clientName ,'!. . ')
|
29 |
| - clientMoney = int(input('Now, Enter your coin! : aleast 10000 Coin')) |
30 |
| - while clientMoney < 10000 or None: |
31 |
| - print('Coin must be aleast 10000!', clientName, 'coin is', clientMoney ) |
32 |
| - clientMoney = int(input('Please valid coin!')) |
33 |
| - if clientMoney < 10000: |
34 |
| - continue |
35 |
| - if clientMoney >= 10000: |
36 |
| - print('Hello', clientName, 'Thanks You! - - - -') |
37 |
| - clientUseMoney = int(input('How many conin wanna use ? Enter. :aleast 1000 : ')) |
38 |
| - while clientUseMoney < 1000 or None: |
39 |
| - print('Use Coin must be aleast 1000!', clientName, 'Used coin is : ', clientUseMoney ) |
40 |
| - clientUseMoney = int(input('Please valid Use coin!')) |
41 |
| - if clientUseMoney < 1000: |
42 |
| - continue |
43 |
| - if clientUseMoney >= 1000: |
44 |
| - print('You used ', clientUseMoney , 'coin for game!- - -') |
45 |
| - luckyNum = int(input('Insert your lucky Number! Must be two Number!------ ')) |
46 |
| - while len(str(luckyNum)) < 2 or None: |
47 |
| - print('Use two number!', clientName, 'inserted lucky number is', luckyNum ) |
48 |
| - luckyNum = int(input('Please valid Luck Number!')) |
49 |
| - while len(str(luckyNum)) < 2 or len(str(luckyNum)) > 2: |
50 |
| - continue |
51 |
| - if len(str(luckyNum)) == 2: |
52 |
| - sysNumber = secureNumber.randint(10,99) |
53 |
| - countNum = 0 |
54 |
| - while countNum < 3: |
55 |
| - print('Wait... What is Number Today is . . .') |
56 |
| - countNum +=1 |
57 |
| - if sysNumber == luckyNum: |
58 |
| - clientMoney = clientMoney + clientUseMoney |
59 |
| - print('Today Number is : ', sysNumber) |
60 |
| - print('Hey',clientName,'Congratulation. . .You Won!!!!----') |
61 |
| - print('Hey',clientName,'You got',clientMoney) |
62 |
| - else: |
63 |
| - clientMoney = clientMoney - clientUseMoney |
64 |
| - print("Today number is :", sysNumber) |
65 |
| - print("Your Lucky number is :", luckyNum) |
66 |
| - print("Sorry..Good Luck again", clientName) |
67 |
| - print('Hey',clientName,'Your Coin : ',clientMoney) |
68 |
| - print('Your Coin',clientMoney) |
| 31 | + while True: |
| 32 | + clientMoney = int(input('Now, Enter your coin! : aleast 10000 Coin')) |
| 33 | + while clientMoney < 10000 or None: |
| 34 | + print('Coin must be aleast 10000!', clientName, 'coin is', clientMoney ) |
| 35 | + clientMoney = int(input('Please valid coin!')) |
| 36 | + if clientMoney < 10000: |
| 37 | + continue |
| 38 | + while clientMoney >= 10000: |
| 39 | + if clientMoney >= 10000: |
| 40 | + print('your money is ', clientMoney) |
| 41 | + print('Hello', clientName, 'Thanks You! - - - -') |
| 42 | + clientUseMoney = int(input('How many conin wanna use ? Enter. :aleast 1000 : ')) |
| 43 | + while clientUseMoney < 1000 or None: |
| 44 | + print('Use Coin must be aleast 1000!', clientName, 'Used coin is : ', clientUseMoney ) |
| 45 | + clientUseMoney = int(input('Please valid Use coin!')) |
| 46 | + if clientUseMoney < 1000: |
| 47 | + continue |
| 48 | + if clientUseMoney >= 1000: |
| 49 | + print('You used ', clientUseMoney , 'coin for game!- - -') |
| 50 | + luckyNum = int(input('Insert your lucky Number! Must be two Number!------ ')) |
| 51 | + while len(str(luckyNum)) < 2 or None: |
| 52 | + print('Use two number!', clientName, 'inserted lucky number is', luckyNum ) |
| 53 | + luckyNum = int(input('Please valid Luck Number!')) |
| 54 | + while len(str(luckyNum)) < 2 or len(str(luckyNum)) > 2: |
| 55 | + continue |
| 56 | + if len(str(luckyNum)) == 2: |
| 57 | + sysNumber = secureNumber.randint(10,99) |
| 58 | + countNum = 0 |
| 59 | + while countNum < 3: |
| 60 | + print('Wait... What is Number Today is . . .') |
| 61 | + countNum +=1 |
| 62 | + if luckyNum == sysNumber: |
| 63 | + clientMoney = clientMoney + clientUseMoney |
| 64 | + print('Today Number is : ', sysNumber) |
| 65 | + print('Hey',clientName,'Congratulation. . .You Won!!!!----') |
| 66 | + print('Hey',clientName,'You got',clientMoney) |
| 67 | + |
| 68 | + playAgainNum = int(input('enter 1 to play again OR Enter 0 to QUIT****')) |
| 69 | + while clientMoney > 0: |
| 70 | + if playAgainNum == 1: |
| 71 | + break |
| 72 | + while playAgainNum == 0: |
| 73 | + exit() |
| 74 | + else: |
| 75 | + clientMoney = clientMoney - clientUseMoney |
| 76 | + print("Today number is :", sysNumber) |
| 77 | + print("Your Lucky number is :", luckyNum) |
| 78 | + print("Sorry..Good Luck again", clientName) |
| 79 | + print('Hey',clientName,'Your Coin : ',clientMoney) |
| 80 | + if clientMoney == 0 or clientMoney < 1000: |
| 81 | + exit() |
| 82 | + |
69 | 83 |
|
70 | 84 |
|
71 | 85 |
|
|
0 commit comments