+ 1
Create a program that will take the number of seconds as input and countdown to zero
4 odpowiedzi
+ 6
in the first line, you get input and store it in the variable <number>. use it for your program – remove the "number = 3" part.
at the moment your while-loop goes on infinitely.
you are trying to reduce <number> in "number - 1" but you didn't change <number>. you need to write "number = number - 1" to update the value.
+ 4
What have you tried so far?
Show your code.
+ 2
# take the number as input
number = int(input())
#use a while loop for the countdown
number=3
while number>0:
print(number)
number-1
+ 2
Thanks Ma'am 😊😊