KS3 Puzzle 9 Challenge Python – while loop

Code / algorithm aim

The code should import the time module and set the x variable to 10.

It should then set a conditional loop that will end when x = 0.

The program will display the value of x then take 1 away from x and wait 1 second.

When x has reached 0 the program will display that time is up.

WAIT! You aren’t logged in.
By logging in you can earn CS points and keep track of what you have done. Do you want to:

Login    

Join Now



Instructions (click to view)

All the code that you need has been given below. Simply organise the code blocks into the correct order and indent where necessary (by dragging the code block to the right) so that the code follows the algorithm aim above.