python-by-example-150-chall.../challenges45-51/challenge-049.py
2019-07-17 16:43:09 +03:00

12 lines
329 B
Python

compnum = 50
count = 0
number = int(input('Enter number to guess : '))
while number != compnum:
if number > compnum:
print('The number is to high')
else:
print('The number is to low')
count = count + 1
number = int(input('Enter number to guess : '))
print('Well done, you took {0}'.format(count))