Dec-11-2020, 02:25 PM
Hi !
I have to write a function named Countdown:
I treid with this:
I have to write a function named Countdown:
def countdown(n): while n > 0: print(n) n = n - 1 print('Blastoff!')Now if I enter a non-integer value and I want Python to change it to int value how should I get Python to do that?
I treid with this:
def countdown(n): if n not int(n): n=int(t) while n > 0: print(n) n = n - 1 print('Blastoff!')What is wrong with this code?