Each of these gives you a formula and asks for a program. The work is the translation: naming the symbols, ordering the steps, and deciding what the user has to type. Answer on paper first — the whole difficulty is in the plan, not the typing.

1. Distance travelled

Ask for a speed in kilometres per hour and a time in hours, print the distance to one decimal place.

2. Area of a circle

Ask for a radius, print the area to two decimals. Use math.pi, not 3.14.

3. Celsius to Fahrenheit

4. The cost of running something

Ask for watts, hours per day, and the price per kilowatt-hour. Print the daily cost and the cost over a 194-day school year.

5. Averaging, with a guard

The mean of a list of readings is the total divided by how many there are. Write a program that reads numbers until the user types done, then prints the mean — and does not crash when the user types done immediately.

Curriculum connection

B3.2

solve common problems (e.g., calculation of hypotenuse, determination of primes, calculation of area and circumference) by applying mathematical equations or formulas in an algorithm;

Link to original

A1.3

use assignment statements correctly with both arithmetic and string expressions in computer programs;

Link to original

A2.1

write programs that incorporate user input, processing, and screen output;

Link to original