Challenge 2: Distance calculator

Suggested time: 20 minutes

A programmer is designing a program which should display a table showing how far a car will travel over time when it drives at any speed that the user enters.

Some of the lines of code are incomplete. Some sections of the program include different options for lines of code and only one of the options should be included in the program. When the program is complete it should generate a table as shown below

Example program output

Using the file Q03.py below:

Amend the code to make the program work and produce the correct output.
You will need to choose between alternative lines of code and fill in some blank spaces.
Do not change the functionality of the given lines of code.
Do not add any additional functionality

If this was a real question it would tell you to save your code as Q03_FINISHED.py but you might want to save your code so you can show your teacher or come back to it later by pressing Ctrl + S or clicking on the icon that looks like this:

Save / share icon in create.withcode.uk lets you save your code