← ACARA Digital Technologies Years 9–10

Recording actual results and a pass or fail verdict

Copy the actual result exactly as the program gave it, then mark Pass only if it matches the expected result, otherwise Fail. Never change the expected result to fit, and add a note for fails.

Understanding Recording actual results and a pass or fail verdict in ACARA Digital Technologies Years 9–10

What it does: The student records the output word for word, instead of summarising or tidying it up. The expected result stays at 20, and the note records the likely cause of the failure to help fix the code. Record the actual result exactly as the program gave it, including words, spaces and punctuation. A shortened version could hide a real bug. When the actual result matches the expected result, the test is a Pass. Never change the expected result to match the program. The expected result comes from the requirements, so a mismatch shows the program may have a bug. Notes on a failure should say what happened and give a clue about the cause. This helps you find and fix the error later.

Common mistakes: The expected result must be worked out before the test and kept fixed. Copying the actual result into expected makes the test pass automatically (and actual does not exist yet). It should be expected = 20. A single = assigns a value, so it cannot compare the actual and expected results. Use == to check for a match: if actual == expected:.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 536–590) and word search (Modules 536–622).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Your program printed 'Total: 45' but you wrote the actual result as '45'. Is this the right way to record it?
Yes. Shortening the output is fine as long as the number is the sameNo. Copy the actual result exactly: Total: 45
Matches
Expected: 20 | Actual: 10 | Result: Pass
↓
The result is marked Pass even though the actual result (10) does not match the expected result (20). It should be Fail.
Applying
Meanings
Term
Pass or Fail
Meaning
Copy the actual result exactly as the program gave it, then mark Pass only if it matches the expected result, otherwise Fail. Never change the expected result to fit, and add a note for fails.
Practice
def double(n):
Testing
Gaps
if actual expected: print("Pass")
Check Answer
Spots
1expected = actual
2actual = 4 * 5

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Kraken' badge — Deep Sea Master, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Your program printed 'Total: 45' but you wrote the actual result as '45'. Is this the right way to record it?
A. Yes. Shortening the output is fine as long as the number is the same
B. No. Copy the actual result exactly: Total: 45 ✓
Record the actual result exactly as the program gave it, including words, spaces and punctuation. A shortened version could hide a real bug.
2. Expected result: 12. Actual result: 12. What verdict do you record?
A. Fail
B. Pass ✓
When the actual result matches the expected result, the test is a Pass.
3. Expected result: 7.5. Actual result: 7. What verdict do you record?
A. Fail ✓
B. Pass
7 is not the same as 7.5, so the actual result does not match the expected result. That is a Fail.
4. A test fails because the program output 20 but you expected 25. What should you do with the expected result?
A. Leave it as 25 and record the Fail ✓
B. Change it to 20 so the test passes
Never change the expected result to match the program. The expected result comes from the requirements, so a mismatch shows the program may have a bug.
5. Which entry in the Notes column is better for a failed test?
A. Output was 20 but 25 expected. Total may be missing the last item ✓
B. Failed
Notes on a failure should say what happened and give a clue about the cause. This helps you find and fix the error later.

Match the Pairs

Expected: 15 | Actual: 15 | Result: Pass → The actual result matches the expected result exactly, so the test is marked Pass.
Expected: 15 | Actual: 5 | Result: Fail → The actual result does not match the expected result, so the test is marked Fail and a note should be added.
Copy the actual result exactly as the program displayed it, including spaces, capitals and punctuation. → Actual: Total: $12.50
When a test fails, keep the expected result unchanged and write a note describing what went wrong. → Expected: 20 | Actual: 10 | Result: Fail | Note: added instead of multiplied
Expected: 20 | Actual: 10 | Result: Pass → The result is marked Pass even though the actual result (10) does not match the expected result (20). It should be Fail.
Expected: 10 (changed from 20) | Actual: 10 | Result: Pass → The expected result was changed to match the actual result, which hides the bug. The expected result must stay 20 and the test should be marked Fail.

Key Term

Pass or Fail
Copy the actual result exactly as the program gave it, then mark Pass only if it matches the expected result, otherwise Fail. Never change the expected result to fit, and add a note for fails.

Fill in the Blanks

1. expected = 5 actual = add(2, 3) if actual == expected: print("Pass")
Hint: Type the operator that checks whether the actual result is equal to the expected result.
2. v = "Pass" if actual == expected else "Fail"
Hint: Type the keyword that gives the verdict to use when the two results do not match.
3. if actual != expected: print("Fail: got", actual, "want", expected)
Hint: Type the variable holding the planned result, so the failure note shows it next to the actual one.
4. actual = add(2, 3) print("Actual:", actual)
Hint: Type the variable that holds the result the program really gave, so you can copy it exactly.
5. expected = 5 actual = add(2, 2) if actual != expected: print("Fail")
Hint: Type the variable that stays fixed as the planned result. Never edit it to fit the program output.

Spot the Error

Question 1
A expected = actual
B actual = 4 * 5
C if actual == expected:
D print("PASS")
E else:
F print("FAIL")
Line A — The expected result must be worked out before the test and kept fixed. Copying the actual result into expected makes the test pass automatically (and actual does not exist yet). It should be expected = 20.
Question 2
A expected = 20
B actual = 4 * 4
C if actual = expected:
D print("PASS")
E else:
F print("FAIL")
Line C — A single = assigns a value, so it cannot compare the actual and expected results. Use == to check for a match: if actual == expected:
Question 3
A expected = 7.5
B actual = 15 / 2
C if actual != expected:
D print("PASS")
E else:
F print("FAIL")
Line C — Pass means the actual result matches the expected result. With != the test would print PASS when the results are different. It should be if actual == expected:
Question 4
A expected = 30
B actual = 5 * 5
C expected = actual
D print(actual == expected)
Line C — The program must not change the expected result to fit what it produced. Doing that hides the failure (25 is not 30). This line should record the actual result: print("Actual:", actual)
Question 5
A expected = 12
B actual = 3 + 4
C if actual == expected:
D print("FAIL")
E else:
F print("FAIL")
Line D — This branch runs when actual matches expected, so the verdict must be Pass. It should be print("PASS"). The FAIL message belongs in the else branch.

Student with a class code? Join your class →