Put in order · Python course · Module 1: Python Basics
The while Loop
Arrange the while loop so that it prints 5, 4, 3, 2, 1 in turn:
Items to put in order
- print(water)
- water = water - 1
- while water > 0:
- water = 5
Show the answer
Correct order:
- water = 5
- while water > 0:
- print(water)
- water = water - 1