the-honk/school/gcse/year 9/python challenges/20 - Guess 7.py

11 lines
183 B
Python
Raw Permalink Normal View History

2021-05-28 20:38:55 +00:00
def guess():
num = int(input('Please input a number.'))
if num == 7:
print('Well done!')
exit()
else:
print('Try again!')
guess()
guess()