- 1
write a python program using a while loop that asks the user for a number and prints a countdown from that number to zero.
3 Respostas
+ 1
n=int(input("Enter n value:"))
for i in range(n,-1,-1):
print(i)
+ 1
@Vanapalli's code in one line:
[print(i) for i in range(int(input("Enter n value:")), -1, -1)]
- 1
Write a python program using a while loop that asks the user for a number and prints a countdown from that number to zero