Testing a prototype for accuracy
Comparing the prototype's actual output with expected results worked out by hand from known data, to find wrong values such as rounding or conversion errors.
Understanding Testing a prototype for accuracy in QCE Digital Solutions Unit 4
What it does: The hand-calculated expected result is stored first, then compared with the actual output from the prototype. int() cuts off the decimal part, giving 2, but round(2.5, 1) keeps 2.5. Comparing against the hand-calculated 2.5 reveals the error. By hand: 3 x 2.50 = 7.50. GST is 0.75. Total is 8.25. Accuracy testing looks for changes between what was received and what is displayed, such as a truncated or wrongly converted number. Layout is a usability matter. Accuracy is about whether values are correct, not whether the code runs. Wrong rounding or conversions give no error message.
Common mistakes: The conversion formula is upside down. By hand, 25 * 9 / 5 + 32 = 77.0, but 5 / 9 gives about 45. The test would fail because of a formula error, so the line should be celsius * 9 / 5 + 32. int() truncates 19.999 to 19 instead of rounding it. The hand-calculated expected value is 20.0, so the prototype must round with round(price, 1).
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 334–401) and word search (Modules 127–401).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
accuracy testingFill in the Blanks
Spot the Error
Student with a class code? Join your class →