python-by-example-150-chall.../challenges52-59/challenge-057.py
2019-07-18 12:44:06 +03:00

12 lines
293 B
Python

import random
choose = random.randint(1, 10)
ask = 0
while choose != ask:
ask = int(input('Choose number from (1-10) to guess computer number ! : '))
if choose > ask:
print('Too low')
elif choose < ask:
print('Too high')
print('Correct number {0}'.format(choose))