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

6 lines
162 B
Python
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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!")