MENU
Question -

Write a program using while loop that asks the user for a number, and prints a countdown from that number to zero.



Answer -

num = input (“Enter the number”)
while (num > = 1) :
print (“num = “, num)
num – num-1
print (“Finish”)

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×