0

Can anyone help me and fix this where is the wrong?

# take the number as input number = int(input()) #use a while loop for the countdown while number > 0 : print (number) number = number -1

28th Jul 2023, 8:37 PM
Loay Sobhy
Loay Sobhy - avatar
4 Respostas
+ 6
Do not put code in the title section. It gets cut off. Show your complete code and explain what it is supposed to do. Tag "Python", not "."
28th Jul 2023, 8:38 PM
Lisa
Lisa - avatar
+ 4
Loay Sobhy All that needs to be fixed is for the line, ‘number = number -1’ to be indented at the same level as the print function. This will create a proper decrementing function.
28th Jul 2023, 8:54 PM
David
David - avatar
0
Try this # take the number as input number = int(input("please enter the number: ")) #use a while loop for the countdown while number > 0 : print ("its number", number) #4 spaces number -= 1 #please don't forget to use 2 or 4 spaces before the "print"
28th Jul 2023, 10:35 PM
Meiqdad Hassani
Meiqdad Hassani - avatar
0
#Can anyone help me and fix this where is the wrong? # take the number as input number = int(input()) #use a while loop for the countdown while number > 0: number = number +1 print (number)
30th Jul 2023, 7:40 PM
Eaz Mahodi Sagor
Eaz Mahodi Sagor - avatar