- 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.

4th Sep 2017, 12:59 AM
Vanapalli Sandeep
3 ответов
+ 1
n=int(input("Enter n value:")) for i in range(n,-1,-1): print(i)
4th Sep 2017, 1:01 AM
Vanapalli Sandeep
+ 1
@Vanapalli's code in one line: [print(i) for i in range(int(input("Enter n value:")), -1, -1)]
4th Sep 2017, 1:06 AM
ChaoticDawg
ChaoticDawg - avatar
- 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
6th Jul 2019, 2:06 AM
Haswanth Tummala
Haswanth Tummala - avatar