Python developer course Practice (time's up) | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grátis
+ 3

Python developer course Practice (time's up)

I don't know why it doesn't work. Please can anyone explain to me? # take the number as input number=int(input()) #use a while loop for the countdown while number<0: print(number) number=number-1

29th Mar 2024, 8:36 AM
박신영
박신영 - avatar
2 Respostas
+ 4
< means "smaller than". when you enter 5, 5 < 0 is false and the loop will never execute.
29th Mar 2024, 8:53 AM
Lisa
Lisa - avatar
0
Thank you
29th Mar 2024, 8:57 AM
박신영
박신영 - avatar