-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuess_Game.py
36 lines (33 loc) · 1.32 KB
/
Guess_Game.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
#Guess_Game
from random import randint
print("<<<<<<<<<<<<<<<<<<<<<<<<<<<<")
print("WELCOME TO THE GUESS GAME")
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>")
SIZE = 10
count = 0
for i in range(SIZE):
number = randint(0, 10)
print("--------------------------------------------------")
guess = int(input("==> Enter a number between (1 to 10): "))
print("--------------------------------------------------")
if number == guess:
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
print("==>YOU WON!<==, The number was ", guess, "!!!!")
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
count += 1
break
elif guess > number:
print("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
print("Sorry... This time the number was ", number)
print("Your guess was larger :(")
print("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
elif guess < number:
print("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
print("Sorry... This time the number was ", number)
print("Your guess was Smaller :(")
print("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
if count == 0:
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("===> G-A-M-E O-V-E-R <===")
print("! ! YOU RAN OUT OF CHANCES ! !")
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!")