-
Notifications
You must be signed in to change notification settings - Fork 0
/
Igra.py
34 lines (23 loc) · 848 Bytes
/
Igra.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
import random
print "Welcome to my hidden numbers game! Ques the number between 0 in 20!"
answer = "Y"
while answer == "Y":
user_input = raw_input("Please input number of your choice -->>")
user_input = int(user_input)
random_number = random.randint(0, 20)
while user_input != random_number:
if random_number < user_input:
print "Your number is to high! Try again!"
else:
print "your number is to low! Try again!"
user_input = int(raw_input())
print "You quesed the right number! Congratulations!"
while True:
print "would you like to play another game?"
answer = raw_input().upper()
if answer not in "YN":
print "Please enter Y or N only."
else:
break
print "Thank you for playing"
print "this is different"