Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # as input a positive whole number, and prints
- # out all the whole numbers from 1 to the input
- # number.
- # Make sure your procedure prints "upwards", so
- # from 1 up to the input number.
- def print_numbers(x):
- while x>0:
- x=x-1
- return x
- return x
- print print_numbers(3)
- #print_numbers(3)
- #>>> 1
- #>>> 2
- #>>> 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement