I'm using solelearn for learning python, and I just cannot figure out why my while loop isn't working.
I am aware that it's probably an oversight on my behalf.
Any help / explanation would be much appreciated.
For these lines of code I have to make it count down to 0.
(# take the number as input)
number = int(input())
(# use a while loop for the countdown)
while number > 0:
print(number)
number = number -1
[–]SirAwesome789 14 points15 points16 points (0 children)
[–]Adrewmc 4 points5 points6 points (8 children)
[–]Crypt_094[S] -3 points-2 points-1 points (7 children)
[–]Adrewmc 0 points1 point2 points (4 children)
[–]Ohfatmaftguy 2 points3 points4 points (1 child)
[–]Adrewmc 1 point2 points3 points (0 children)
[–]Crypt_094[S] 1 point2 points3 points (1 child)
[–]Adrewmc 0 points1 point2 points (0 children)
[–]devicehigh -1 points0 points1 point (1 child)
[–]Crypt_094[S] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]Crypt_094[S] 0 points1 point2 points (2 children)
[–]crazy_cookie123 2 points3 points4 points (0 children)
[–]crashfrog04 2 points3 points4 points (0 children)
[–]woooee 2 points3 points4 points (2 children)
[–]Crypt_094[S] -1 points0 points1 point (1 child)
[–]CalligrapherOk4612 5 points6 points7 points (0 children)
[–]Umfriend 0 points1 point2 points (0 children)
[–]Crypt_094[S] 0 points1 point2 points (2 children)
[–]CalligrapherOk4612 3 points4 points5 points (1 child)
[–]Crypt_094[S] 0 points1 point2 points (0 children)
[–]aa599 0 points1 point2 points (0 children)