The lesson

🧑‍🏫 Teacher Guide

Floor, and be ready to catch it — this car reverses without warning. The wiki program holds each random pair for one second (pause 1000). Without that pause the speeds change about 50 times a second and the car only shivers. Fix It answer: the range starts at 0, so the wheels can never run backwards and the car only ever curves forwards. Source: ElecFreaks wiki, Case 04 "Run at Random".

🟡 Keep the wandering, but stop it from ever driving backward.
Find the two numbers that set the range → Decide which one lets it reverse → Change only that one → Watch a full minute to be sure
🟡 Make it wander for ten seconds and then stop by itself.
Find a way to count the time → Decide where the counting goes → Choose the block that stops the wheels → Test with a stopwatch
🔴 Make the car wander but stay inside a chalk circle on the floor.
Work out what the car would need to sense → Check which sensor you have met so far → If none fits, say what you would need and why
math_random_range

Picks a random whole number between two numbers.

cuteBot.motors(randint(30, 100), randint(30, 100))
basic.pause(1000)
cuteBot.stopcar()

You see: The car drives off at a different speed and curve most times you run it.

Answer key

Conceptc1 → B, c2 → A
Readingr1 → D, r2 → D, r3 → D
Debugd1 → B, d2 → B
Buildingb1 → B, b2 → B

Talk rubric

Strong — says the car is doing exactly what the program says, and that unpredictability was chosen on purpose by using the random block. Developing — says it is not broken but does not point to the random block as the deliberate cause. Needs Focus — agrees that it is broken, or says the micro:bit changes the program.

A week later

These questions are not on the check-up page. They come back in the next chapter's Warm-up, five days or more after the check-up — with one new program on the same idea each.

Concept 1 🗓️ Comes back a week laterpick random -100 to 100 gives you a number. What decides which one? → B The micro:bit picks one you cannot predict
· New code (same idea)pick random 1 to 6 runs three times. Which list of numbers could you get? → A 4, 4, 1
Reading 3 🗓️ Comes back a week laterWhat can this car never do? → B Reverse
· New code (same idea)What can this car never do? → D Drive forwards