Rullst AcademyRullst Academy/Lesson
Computational thinking: from idea to plan · Lesson 06 / 07

An error leaves a clue

A plan delivered correctly on a dry day and failed in the rain. Finding a failure is not losing: it gives us a clue to improve the rule.

Learning paths7 min

Let's discover together

  1. 1

    Debugging means investigating and correcting errors. First compare what you expected with what happened. Then follow the state after each instruction.

  2. 2

    Faulty plan: pack → deliver → protect if it rains. In rain, the first failure occurs at delivery: the kit is not yet protected. The test stops there.

  3. 3

    Move the protection decision before delivery. Then test rain and dry weather again. Always protecting would fix one case but break the rule against unnecessary protection in dry weather.

  4. 4

    Add different inputs: 1 order, 3 orders and zero. Passing tests increases confidence in the checked cases, but does not prove that every real-world situation was covered.

✦
YOUR MISSION

Identify the first step that breaks a rule and choose tests that expose an incomplete fix.

Now it's your turn

Discovery workshop

An error leaves a clue

There is 1 order and rain. Step 1: pack. Step 2: deliver. Step 3: protect if it rains. The rule requires protection before delivery.
Build your answers and check when you are ready.
A moment to understand

What should we do after fixing a failure?

I need a hint

Find the first state that violates the rule. Fix the cause and test both sides of the condition.

Loading your journey…

Take it with you

Write an intentionally faulty plan. Record the input, expected result, first failure and fix. Then look for a case that challenges your fix.

At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.