Lesson Block · Detail

Coffee Slalom

They promote skills in variables, conditions, and if-statements with random values. The block is didactically relevant as it exercises decision-making in dynamic scenarios.

Time 15 min
Format rpgDungeon
Language Python 2 (CE)
Tasks 1
Preview Image: Coffee Slalom

Introduction (Original Excerpt)

Linus Lag can't get going without coffee. But be careful: more than 500 ml and his head is racing.

Didactic Classification

Subjective Objective

The block introduces concepts like variables for sum storage, conditions for boundary checks, and if-statements. It requires a structured modeling of the slalom path through the cafeteria with navigation and interaction. The connection between modeled logic and programming implementation ensures that students implement decision-making concretely.

Competence Development

Didactic Value in the Classroom

Flow of the Lesson Unit

1

Not too much Coffee

You control the robot to all coffee cups, read quantities and check with If-conditions whether drinking is possible. This step integrates navigation, interaction, and logic in the overall process. It closes the building block by centralizing the boundary check.

  • Didactic Focus: Conditional Decisions with Sums.
  • Typical Challenge: Correct Sequence of Evaluation and Accumulation.

Work Assignment (Excerpt)

  1. Control all cups and read the quantity.
  2. Build an If-condition that checks whether drinking is still allowed.
  3. Only empty the cup if total + value < is maximum.

Example (Excerpt)

This fragment shows the core logic of the boundary check and makes the If-query with variables didactically tangible.

1
2
3
4
wert = int(interagieren())
if wert + gesamt < maximal:
    interagieren(0)
    gesamt = gesamt + wert

Hints for Classroom Practice

This module connects if-questions with random values and creates a clear foundation for conditional decisions.

You benefit from a clear task structure, which simplifies lesson organization and enables result assurance. Differentiation succeeds through adjustable random values.

Request a demo access and try the module in your course context.