python-by-example-150-chall.../challenges35-44/challenge-043.py
2019-07-17 16:43:09 +03:00

12 lines
384 B
Python

direction = str(input('Enter direction? up|down : '))
if direction.lower() == 'up':
top = int(input("Please enter top number to start count todow!"))
for i in range(0, top+1):
print(i)
elif direction.lower() == 'down':
below = int(input('Please enter number below 20!'))
for i in range(20, below-1, -1):
print(i)
else:
print('I don\'t understand')