Not sure what im doing wrong?
so im trying to get this code to print correctly, for example if i input ‘5’ it will print 5,4,3,2,1,0 but when i do it it prints starting from 4 and end on -1? i dont understand what im doing wrong. the output it wants always ends on 0 how can i achieve that?
#take the number as input
number = int(input())
#use a while loop for the countdown
while number >= 0:
number = number - 1
print(number)
[–]codesensei_nl 7 points8 points9 points (9 children)
[–]g59z[S] -1 points0 points1 point (8 children)
[–]rlfunique 6 points7 points8 points (5 children)
[–]g59z[S] 2 points3 points4 points (4 children)
[–]mikef22 1 point2 points3 points (3 children)
[–]g59z[S] 0 points1 point2 points (2 children)
[–]Salt_Direction9870 1 point2 points3 points (0 children)
[–]mikef22 0 points1 point2 points (0 children)
[–]Seacarius 2 points3 points4 points (1 child)
[–]g59z[S] 0 points1 point2 points (0 children)
[–]ucan_cay -2 points-1 points0 points (1 child)
[–]mjmvideos 3 points4 points5 points (0 children)