Need help with a script
Hello all,
I'm learning python with the help of a book called think python 2. In chapter 6 there is an exercyse where you have to make a program that counts down from 10 to 0. When it reaches 0 it should print blast off.
Now as an extra exercyse, I thought I'm going to let the user put the number in themselves instead of having the number written in the script already, but there is something wrong in my code.
I have tried everything I could think of and I wanted to ask if somebody could have a look into it and tell me what is wrong.
Code
def countdown(n):
n = input('Put a number in.')
if n <= 0:
print('blastoff')
else:
print(n)
countdown(n-1)
countdown(n)
Thanks a lot and have a good day.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector