RosettaCodeData/Task/Guess-the-number/Python/guess-the-number.py
2018-06-22 20:57:24 +00:00

5 lines
162 B
Python

import random
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! "))
print("That's right!")