91. Python Program to Print a Countdown with a While Loop
Easywhile
Overview
Count down instead of up: start high and make the counter smaller each round.
Problem Statement
Read a whole number n (0 or more). Print n, n - 1, and so on down to 1, one per line, using a while loop. Then print Liftoff!. For example, for 3:
3
2
1
Liftoff!
If n is 0, only Liftoff! is printed.
Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.
Input
One value per line. Example:
3
Output
The output for that example:
3
2
1
Liftoff!
The tests try 4 different inputs.