Community resourceWorksheet
1CP2-CT-7.3 Maths time and formatted output
Part 3 of 5 · 1CP2-CT-7 · Subprograms, scope and libraries
The maths and formatting worksheet, using only the methods the Pearson subset permits and displaying the result deliberately.
Students will:
- match each permitted maths method to what it actually does
- explain why rounding and format strings can give different output
- describe the effect of pausing a program with a timed delay
- choose the correct method when a division must round upwards
- format a number to a fixed width and a fixed number of decimal places
Inside: 7 explanation cells, 3 multiple-choice questions, 1 Python task, 1 fill-in-the-blanks cell and 2 written answers. 16 marks, about 45 minutes.
Series: 1CP2-CT-7 · Subprograms, scope and libraries, part 3 of 5.
Shared by Coding PathwayVerified teacher
- 14 cells
- About 45 minutes
- CC BY-SA 4.0
- Shared 17 Aug 2026
Preview
The whole resource, exactly as a class sees it. Answers and marking are held back.
Maths, time and formatted output
Pearson's Programming Language Subset v6 permits math.ceil(x), math.floor(x), math.sqrt(x), math.pi, time.sleep(sec), round(x, n) and string.format. Import a library before using its members. Choose a method from the required result—not from habit.
1. Match methods to meanings
math.ceil(4.1)gives the smallest integer at least 4.1:5.math.floor(4.9)gives the largest integer at most 4.9:4.math.sqrt(81)gives9.0.math.pisupplies π for circle calculations.round(3.14159, 2)gives3.14using Pearson's stated 0.5 rule.time.sleep(1)pauses the current process for one second.
Ceiling and floor move to integer boundaries; they are not alternative spellings of rounding.
- math.ceil
- math.floor
- math.sqrt
- round
- time.sleep
2. Format for a user
import math
radius = 3
area = math.pi * radius ** 2
layout = "Area: {:.2f}"
print(layout.format(area))
The placeholder {:.2f} uses fixed-point notation with exactly two digits after the decimal point. Formatting controls presentation; round(area, 2) changes the numeric value held or returned. Use the method the question asks for.
3. Predict before execution
Read this code without running it.
import math
value = 6.25
print(math.floor(value))
print(math.ceil(value))
print(round(math.sqrt(value), 1))
Which option gives the exact three lines of output?
- A`6`, `6`, `2.5`
- B`6`, `7`, `2.5`
- C`7`, `6`, `2.5`
- D`6.0`, `7.0`, `3.0`
Explain why the first two outputs differ even though both use the same input value.
Define the boundary selected by floor and ceiling.
Students type their answer here.
4. Use time deliberately
import time
print("Ready")
time.sleep(1)
print("Go")
The pause occurs between the two outputs. time.sleep does not measure elapsed time, schedule a future event or change the printed text. In an examination program, use it only when a timed pause supports the stated user experience.
What is the effect of time.sleep(2)?
- AIt waits until 2 o'clock.
- BIt suspends the current process for two seconds.
- CIt repeats the next line twice.
- DIt records a time of two seconds in a variable.
5. Construct with permitted methods
Define circle_area(radius) and return the area using math.pi. Call it with radius 4, store the result in area, store a value rounded to two decimal places in rounded_area, then print exactly Area: 50.27 using string.format.
import math
# Define circle_area, call it for radius 4, round and format the result.
A coach needs enough whole minibuses for 41 pupils when each minibus holds 12. Name the suitable maths method after division and justify it.
The answer must never leave a pupil without a seat.
Students type their answer here.
Which expression displays 7 as a field three characters wide, right aligned?
- A`"{:>3d}".format(7)`
- B`"{:.3f}".format(7)`
- C`round(7, 3)`
- D`math.sqrt(49, 3)`
Route forward
You can select and explain each permitted maths/time method and distinguish numeric rounding from formatted presentation. Next you will combine them in a structured problem-solving task.