Python | Ranges and loops exercise | Count down from 10 to 1 so your rocket can blast off

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Software ==> Python  (28 exercises)
Version ==> Latest version
Topic ==> Ranges and loops  (4 exercises)
Level ==> Relatively easy
Subject ==> Python training

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

The aim of this exercise is to count down as follows:

Counting down

Your program should count down from 10 to 1.


Create a program called Ignition  Within this create a loop which goes from 10 down to 1.  The syntax of the range function is as follows:

The range function

How to write a range function loop.

Within the loop, your program should print out the countdown number.  Here's a hint to show you how you could use the format function to display your results:

Example of format function

This program would print out a neatly formatted message.

Finish your program with a blast-off message, test it and close it down. 

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.
This page has 0 threads Add post