Week 8 · Lesson 2 · 55 minutes

Practise a clear answer and an independent build

Show enough reasoning and test code without copying a finished solution.

Planned lesson. Follow your teacher’s teaching order.

Source workbook pages: 49.

Resources

Vocabulary

Vocabulary
describe: Give the relevant features or steps; explain: Give a reason or show how it works; trace: Follow values step by step
55-minute lesson sequence
  1. 0–5 · Answer the retrieval alone. Compare one reason.
  2. 5–15 · Teacher models the example. Students predict each next step.
  3. 15–40 · Build, trace and test the main tasks. Work alone first; compare after a checkpoint.
  4. 40–50 · Check results. Explain a test and repair one error. Use the extension only if ready.
  5. 50–55 · Complete the exit alone. Save the evidence for the next lesson.

Try before notes

What extra information does explain ask for compared with only naming a component?

Build the idea

An explanation connects a mechanism to a result. Name the component, describe what it does in this situation and state why that matters. Avoid claims like “it is better” without a relevant cause.

Independent building means using the requirement and permitted syntax reference, not copying a finished function. Plan the loop or decision, predict small tests and then run it. An honest failure can locate the next repair.

Command words change the response. Describe gives relevant features; explain gives reasons; trace records successive states; evaluate weighs benefits and limits before a supported judgement.

claim → mechanism → effect in this situation
input → predicted result → actual result → judgement

See the method

Question: Explain why a greenhouse controller keeps a local copy of its rule. Weak answer: Local is better. Stronger answer: The local device can read the sensor and choose a fan action when the internet is unavailable, so control does not wait for a remote reply. The reason is tied to this brief.

Predict then reveal

Improve this answer: “A cache helps because it is fast.” Use a repeated memory access.

Reveal reasoning

A cache keeps a copy of data likely to be reused. If a later request hits that copy, the processor can obtain it from cache rather than a slower lower memory level, reducing access time for that request. A miss still needs a lower-level access.

A rule is score<14. Which single input most directly distinguishes it from score<=14? Give both results.

Reveal reasoning

Use 14. For <14 the result is False; for <=14 it is True. A far-away value such as 3 gives True for both, so it cannot distinguish the equality mistake.

Work one step together

Read the first task. Each learner predicts the first step privately. Compare the method, then complete one intermediate row or one code iteration together. Do not display a finished workbook answer.

Practice

  1. Build count_below(values, limit). Return the number of values strictly below limit. Test [], [10] and [9, 10, 11] with limit 10. Record expected answers first. Use no finished solution while building; then check and repair.

Your turn

Complete the remaining steps of task 1 alone, then the next tasks. Predict before running code. Save your own evidence before comparing.

Practice

  1. Build count_below(values, limit). Return the number of values strictly below limit. Test [], [10] and [9, 10, 11] with limit 10. Record expected answers first. Use no finished solution while building; then check and repair.
  2. Answer two short explanations. Why can a compressed image not be sized exactly using only width×height×colour depth? Why can round robin help a short process get CPU time sooner than FCFS? Use a specific mechanism in each answer.
  3. Check readiness with your teacher: Can you follow the question layout, use the supplied Python syntax card and save a file? Agree any access arrangements before the proposed checks. Write one practical question now.

Check and explain

An explanation needs the causal link, not merely a named advantage.

Point to the first step, row, condition or requirement that supports your answer. If results differ, find the first different state and repair one cause.

Show what you know

Give one test that distinguishes < from <= at limit 10.

HL challenge when ready

Write one assertion for each of the three count_below tests.

Week 8 homework

Show working. Keep code and output. Stop at 25 minutes and mark where you reached.

  1. Choose one returned theory error or a practice error. Write the original question in a few words, your corrected answer and one reason. If no work has been returned, use the MAR/MDR distinction.
  2. Predict and trace count_high([59, 60, 61], 60) and count_high([], 60). State which case checks equality and which checks an empty input.
  3. Prepare one question to bring on Monday 11 January. It must refer to a particular example, trace step or test result.

Source workbook pages: 54.

Weekly homework (Word)

Python practice · two short prompts

Spend about 3 minutes on each during practice time. Predict, run, change one thing, then explain. These prompts do not add homework.

A starter is runnable code to explore or complete. If the playground restores your saved code, the linked starter is selected in Example: use Load example when ready. Download your work before confirming replacement.

Prompt 1

Explain a condition in plain language, then verify it with three values.

No imports needed.

Hint and starter code

>= includes equality; record predicted and actual output.

# >= includes equality; record predicted and actual output.
for value in [9, 10, 11]:
    print(value, value >= 10)
Open this starter in Python playground →
Prompt 2

Write a tiny function from its description: return twice the input. Keep the starter runnable.

No imports needed.

Hint and starter code

Replace the return expression, then test zero and a negative value.

# Replace the return expression, then test zero and a negative value.
def double(value):
    return value  # Your turn: change this line

print(double(3))
Open this starter in Python playground →