RosettaCodeData/Task/Guess-the-number/Python/guess-the-number.py

6 lines
162 B
Python
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
import random
2018-06-22 20:57:24 +00:00
t,g=random.randint(1,10),0
g=int(input("Guess a number that's between 1 and 10: "))
while t!=g:g=int(input("Guess again! "))
2016-12-05 22:15:40 +01:00
print("That's right!")