-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLOTTERY.py
More file actions
65 lines (63 loc) · 2.05 KB
/
LOTTERY.py
File metadata and controls
65 lines (63 loc) · 2.05 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
import random
import sys
print("HEY, WANNA PLAY? ALL IT TAKES IS A LITTLE PART OF\n YOUR DAY!\nENTER A NUMBER 1-100 IF YOU GUESS RIGHT,\n YOU\'RE THE BEST!\nREADY TO PUT IT TO THE TEST?")
main = (str(input("\nWould you rather try to guess 1 number - you can have a certain amount of guesses - or spam other? Press 1 for one number and 2 for spam - type \"quit\" at anytime to see the answer - ")))
"""
if main != "1" or main != "2":
print("\nINVALID INPUT")
sys.exit()
else:
pass
"""
count = 0
if main == "1":
value=(int(random.randint(1,100)))
print(value)
print("\nOne number? Cool, I think that's more fun anyways.")
#bet = input("\nHow many guesses do you want?")
guess=(int(input("\nWhat's your guess?! - ")))
while guess != value:
if guess > value:
print("Too high...")
elif guess < value:
print("Too low...")
elif guess == (int("quit")):
print("Giving up so soon? The winning number was - " + (str(value)) + "BETTER LUCK NEXT TIME!")
elif guess == bet:
print("\nYou ran out of guesses, better luck next time!")
print("")
break
elif guess == value:
break
guess=(int(input("\nWhat's your guess?! - ")))
count += 1
elif guess==value:
print("WOW, YOU GOT IT - THE NUMBER WAS - " + (str(value)) + "TEST")
else:
guess=(int(input("\nWhat's your guess?! - ")))
value=(int(random.randint(1,100)))
if guess=='right':
print("\nYOU FOUND THE EASTER EGG!!!!")
break
elif guess>value:
print("Your guess is too high, try again.")
else:
while guess!=value:
print("\nTHE WINNING NUMBER WAS: " + value)
print("\YOU GUESSED IT - " + (str(guess)))
print("")
break
guess=(int(input("\nWhat's your guess? - ")))
value=(int(random.randint(1,100)))
if guess == value:
print("WOW, YOU WON!")
print("")
break
elif guess=='right':
print("\nYOU FOUND THE EASTER EGG!!!!")
print("")
break
elif guess > value and guess != value:
print("Your guess is too high, try again.")
else:
print("Your broke it bum.")