Skip to content
BetaDE

For teachers

Python in class – without accounts.

No registration, no student data on a server, no third-party services. Students open the page and get going – Python runs entirely in the browser.

🔒 Data-minimal

Progress stays in the student's browser. There are no cookies, tracking or accounts. Details are in the privacy policy (German).

✓ Instant feedback

Every task is checked automatically, error messages are explained clearly, and staged hints help before the solution appears.

🤖 Robotics without hardware

The Pybricks simulator lets everyone program at the same time – even with only a few LEGO SPIKE sets. The code then runs unchanged on the real robot.

📶 Offline in the classroom

Poor Wi-Fi? Press the button once on each device while online – after that all lessons, the training room and Python work without a connection. What you saved stays after updates and is refreshed automatically next time you are online. Codelix can also be installed like an app from the browser menu.

📄 Worksheets and model solutions

Every lesson has a “Print worksheet” button at the top: text, examples and task with writing lines, name/date and a QR code back to the lesson. Without hints or the solution – the pro task gets a page of its own.

All model solutions (including the pro tasks) are collected for teachers – unlocked with a question from the book “Python für Roboter”.

🔑 To the model solutions

What a lesson can look like

  1. Warm-up (5 min) – Everyone does the tasks of the day – the same for everyone, good for comparing.
  2. New topic (15 min) – Read the lesson together, run the examples, show memory with “Steps”.
  3. Task (15 min) – Alone or in pairs; the check gives instant feedback.
  4. Practice (10 min) – Training room on the topic; fast learners try puzzle and fix-the-bug tasks.
  5. Hand-in – Send a link to the code with “Share”, or save the progress file at the end of the lesson (see below).

Tip to start: placement test – so everyone sees where to start. Everything important is also on the cheat sheet.

Lesson plans to print

For every area a plan for 45 and for 90 minutes – with the sequence, differentiation and the mistakes that come up in almost every class.

Python

45 minutes: Write first programs with variables, print() and if.

Lessons: Hello, Python!, Decisions with if

MinSequence
5Warm-up: what is a program? Run an example together and change a number.
15Read the lesson “Hello, Python!” together, run the examples, show variables with “Steps”.
15Task alone or in pairs. Use the hint ladder instead of asking straight away.
7Quick check “What does this print?” together: guess first, then check.
3Wrap-up: one pupil explains their program. Preview of if.

For fast learners: Pro task “digital clock” and the lesson “Decisions with if”.

More support: Only the first line of the task; deliberately allow the gap code (hint 3).

Typical mistakes in class:

  • Text without quotes: print(Hello) → NameError.
  • Joining a number and text with + → TypeError (show f-strings).
  • Upper/lower case: Print instead of print.

90 minutes: Analyse data with loops and lists.

Lessons: Loops – repeating things, Lists – many values at once

MinSequence
10Warm-up: today's tasks in the training room – the same for everyone.
20Loops: for with range() together, “Steps” shows every pass.
15Loop task, then a short discussion of typical errors.
5Break / movement
20Lists: create, index, append – run and change examples.
15List task (max, average, counting).
5Wrap-up: who earned a ⭐ without help? Preview of functions.

For fast learners: Pro tasks “number pyramid” and “second largest number”, then training room “Fix”.

More support: Training room “Predict” for loops only; use the gap code.

Typical mistakes in class:

  • Forgetting the colon after for or wrong indentation → SyntaxError/IndentationError.
  • range(1, 10) stops at 9 – “one too few”.
  • Index from 0: list[1] is the second element.
Robotics with LEGO SPIKE

45 minutes: Make a robot drive precisely in the simulator.

Lessons: Your first Pybricks program, Driving with the DriveBase

MinSequence
5Warm-up: show a real SPIKE (if available) or the simulator – ports, motors, hub.
15First program and DriveBase together: try straight() and turn().
20Task “drive a triangle” in the simulator; speed 4× for quick testing.
5Wrap-up: why does the real robot never drive exactly? (calibration as a preview)

For fast learners: Robotics challenge “Sprint” or “Slalom” – share the best time as a link.

More support: Only straight ahead and one turn; follow the starter code line by line.

Typical mistakes in class:

  • turn(90) turns clockwise – sign mixed up.
  • mm and cm mixed up: straight(20) is only 2 cm.
  • Turning 60° instead of 120° for the triangle (exterior angle).

90 minutes: React to the surroundings with sensors and understand a P controller.

Lessons: Sensors – colour, distance, force, Following lines with a P controller

MinSequence
10Review DriveBase: a short driving task without help.
20Sensors: colour, distance, force – look at readings with print() and in the live chart.
15Sensor task.
5Break
25Line follower: on/off control vs. P controller, change KP and observe.
10Mini competition: who drives the lap most smoothly? Then: competition “Warehouse” as a preview.
5Wrap-up: what does KP do?

For fast learners: Competition “Warehouse” (100 points in 60 s) or an own course with missions.

More support: Colour sensor only: stop at red. Give KP and just observe.

Typical mistakes in class:

  • Endless loop without wait() – the robot “hangs”: show the Stop button.
  • KP far too large → the robot wobbles.
  • The sensor port in the code doesn't match the build.
Robotics with fischertechnik

45 minutes: Control motors and lamps on the TXT 4.0 with ftrobopy.

Lessons: The TXT 4.0 and ftrobopy, Controlling XS motors

MinSequence
5Warm-up: show the M, O, I, C ports on a real TXT or in the control panel.
15Connecting and lamps: print() and a lamp as feedback.
20Motors: setSpeed(), then setDistance() with finished() – task “barrier”.
5Wrap-up: why does setDistance() need setSpeed() first?

For fast learners: Do the “light organ” exercise from lesson 3 early.

More support: Only change xs_motor.py: adjust speed and duration.

Typical mistakes in class:

  • setDistance() without setSpeed() → motor stands still, finished() waits forever.
  • Ports counted from 0 – in ftrobopy M1 = motor(1).
  • Forgetting sleep() – the lamp only flashes briefly.

90 minutes: Read sensors and buttons and program a traffic light as a sequence of states.

Lessons: Lamps and buttons, Line tracker and phototransistor, Project: Traffic light control

MinSequence
10Review: lamps on/off, light organ.
15Buttons: try the reversed logic (0 = pressed) together.
20Sensors: phototransistor with the slider, sensor logger as the task.
5Break
30Traffic light project: read the code, states on the board, then program night mode.
10Demo and short reflection: where are states in everyday life?

For fast learners: Extend the pedestrian request or an own project from the book (sorting machine).

More support: Traffic light with only three states and no button.

Typical mistakes in class:

  • Button logic reversed: assuming state() == 1 means “pressed”.
  • Threshold guessed instead of measured.
  • Forgetting all_off() → two lamps on at the same time.
JavaScript

45 minutes: Design an own web page with HTML and CSS.

Lessons: Your own web page: HTML and CSS

MinSequence
5Warm-up: right-click → view source of a well-known page – “that's HTML”.
15Tags and CSS together: the live preview shows every change at once.
20Task: own profile page with a list and a class.
5Gallery walk: show two pages on the projector.

For fast learners: Continue with “DOM and clicks”: a button that changes the colour.

More support: Only change text and one colour; web pages have no gap code – copy an example and adapt it.

Typical mistakes in class:

  • Forgetting the closing tag: <h1>Title without </h1>.
  • Forgetting the semicolon in CSS – the next property doesn't work.
  • Writing the dot in HTML: class=".hobby".

90 minutes: React to clicks with JavaScript and build a small browser game.

Lessons: Web pages with JavaScript: DOM and clicks, Drawing with canvas, Project: click hunt in the browser

MinSequence
10Review HTML/CSS: improve the profile page in 5 minutes.
20DOM and clicks: querySelector, textContent, addEventListener – click counter.
15Canvas: draw shapes, traffic light task.
5Break
30Project click hunt: write hit(), then own ideas (smaller target, restart).
10Class tournament: who gets the most hits in 20 seconds?

For fast learners: Rebuild the click hunt with a canvas instead of a button.

More support: Only the click counter; use the console below the preview for console.log.

Typical mistakes in class:

  • querySelector("number") instead of "#number" → null.
  • Script at the top of the HTML – the elements don't exist yet.
  • Forgetting "px" with style.left.
Programming games

45 minutes: Understand a game loop and steer a figure with keys.

Lessons: Your first game: shapes, loop, keys

MinSequence
5Warm-up: flip book – why does movement look smooth?
15Drawing shapes and coordinates (y points down!) on the board.
20Task: steer the player and keep it inside the window.
5Wrap-up: what happens 30 times a second?

For fast learners: Start the catch game lesson or add own shapes/colours.

More support: Only right and left; the edge as a second step.

Typical mistakes in class:

  • y grows downwards – “up” means making y smaller.
  • Normal variable instead of a dictionary in the function → UnboundLocalError.
  • game.run(update()) with brackets.

90 minutes: Build a complete game with collision, points and game over.

Lessons: Project: catch game, Project: snake game

MinSequence
10Review game loop: a ball from left to right.
20Rectangle collision on the board with two paper rectangles.
20Catch game: hits() and points.
5Break
25Snake game: list as a snake, move() and is_over().
10Play round: try each other's games and give feedback.

For fast learners: Paddle duel with a computer opponent; then two players with W/S.

More support: Catch game without lives; hits() with the gap code.

Typical mistakes in class:

  • <= instead of < in the collision – touching counts as a hit.
  • pop() also when eating – the snake doesn't grow.
  • Reversing direction directly – the snake bites itself.
Exploring computer science

45 minutes: Understand how computers store numbers and text as bits.

Lessons: Binary numbers, bits and bytes

MinSequence
10Warm-up: lights on/off with 4 lamps (pupils) – which number is it?
15Place values 8-4-2-1, try converting with int() and bin().
15Task to_binary() with % and //.
5Wrap-up: quick check and “how many values fit in a byte?”

For fast learners: Continue with encryption (Caesar).

More support: Only convert numbers up to 15 on the board; task with the gap code.

Typical mistakes in class:

  • Remainders joined in the wrong order.
  • Forgetting the special case 0 → empty text.
  • / instead of // → decimal numbers.

90 minutes: Understand encryption and search engines as algorithms.

Lessons: Secret codes – Caesar and Vigenère, How does a search engine work?, How fast is an algorithm?

MinSequence
10Warm-up: crack a secret message on the board (Caesar) together.
20Caesar and brute force in Python, then explain Vigenère.
15Vigenère task; pairs send each other encrypted messages.
5Break
20Search engine: show a book's index, index as a dictionary with sets.
15How fast? Count handshakes in the class (n · (n − 1) / 2) and compare with Python.
5Wrap-up: why is Vigenère still insecure today?

For fast learners: Pictures as pixels: own filters (mirror, blur).

More support: Only Caesar; search engine without cleaning punctuation.

Typical mistakes in class:

  • Forgetting % 26 → characters after Z.
  • Key letter also advanced on spaces.
  • Joining sets with + instead of & or |.

Lessons at a glance

Python

Select for the class link✓#LessonTimeGoals
1Hello, Python!15 minutesPrint text and numbers with print() · Create and use variables · Combine text and numbers with f-strings
2Decisions with if20 minutesRead input with input() and turn it into numbers with int() · Compare values (<, >, ==, …) · Take different paths with if, elif and else
3Loops – repeating things20 minutesRun code several times with for and range() · Repeat with while as long as something is true · Recognise and avoid endless loops
4Project: Drawing with the turtle45 minutesDraw lines, shapes and colours with the turtle · Use loops and functions to create patterns · Program your own artwork and save it as a picture
5Lists – many values at once25 minutesCreate lists and access items by position (index) · Append, change and count items · Analyse lists with sum(), max() and a loop
6Working with strings25 minutesCut out single letters and pieces of text · Change text with upper(), lower() and replace() · Count letters with a loop
7Project: Hangman40 minutesProcess text letter by letter · Work with a set of guessed letters · Build a complete guessing game with a while loop
8Dictionaries25 minutesStore data as pairs of key and value · Look up, change and add values · Go through all pairs with items()
9Project: text adventure45 minutesBuild a game loop with while · Store a game world as a nested dictionary · Check input and react clearly
10Your own functions30 minutesWrite your own functions with def · Pass values in with parameters and give them back with return · Reuse functions inside other functions
11Bug detective: finding bugs30 minutesRead error messages from the bottom up · Find bugs that don't produce an error message · Look inside a program with print() and “Steps”
12Project: quiz game45 minutesOrganise data as a list of dictionaries · Compare answers tolerantly and count points · Split the program into functions
13Boss level: the school report program45 minutesCombine everything from the beginner stage in one project · Analyse data with dictionaries, loops and functions · Present a result clearly
14Catching errors with try25 minutesUnderstand when programs crash · Catch errors with try and except · Handle different kinds of errors differently
15Tuples and sets30 minutesUse tuples as unchangeable pairs of values · Remove duplicate values with sets · Form intersections, unions and differences
16Reading and writing files25 minutesWrite and read files with open() and with · Process the lines of a file · Append data to a file
17JSON – saving data like the pros30 minutesUnderstand what JSON is and where it's used · Save and load dictionaries and lists with json · Keep working with saved data
18Project: guessing game with high score45 minutesBuild a game with a while loop and break · Save a record in a file and load it again · Catch a missing file with try/except
19Modules – ready-made toolboxes25 minutesImport modules like math and random · Tell import, from … import and as apart · Write and use your own module
20Your own tests with assert25 minutesCheck with assert whether code calculates correctly · Find and test edge cases · Write test functions like the pros
21List comprehensions25 minutesCreate lists in a single line · Filter with if inside a comprehension · Write dictionary comprehensions
22Project: weather station45 minutesStore measurements in lists and go through them in pairs with zip() · Calculate the average, minimum and maximum · Show data as a bar chart made of text
23Project: tic-tac-toe45 minutesRepresent a board as a list of lists · Check rows, columns and diagonals · Split a game into clear functions
24Classes and objects35 minutesWrite your own blueprint for objects with class · Set attributes in __init__ and use them through self · Write methods that change an object
25Inheritance – extending classes30 minutesLet one class inherit from another · Override methods and extend them with super() · Check what an object is with isinstance()
26Special methods and @property30 minutesDecide with __str__ how print() shows an object · Compare and calculate with objects using __eq__, __lt__ and __add__ · Write calculated attributes with @property
27Bug detective 2: classes and exceptions35 minutesRead longer error messages (tracebacks) step by step · Find bugs in classes (forgotten self, wrong calculation) · Check things deliberately with assert and f"{x=}"
28Boss level: the library60 minutesDesign your own class with several methods · Report errors with your own exceptions · Save data in a file and load it again
29Recursion – functions that call themselves40 minutesUnderstand how a function can call itself · Tell the base case from the recursive step · Break problems down into smaller problems of the same kind
30Algorithms – searching and sorting45 minutesUnderstand what an algorithm is · Compare linear and binary search · Program a sorting algorithm yourself
31Generators and yield25 minutesWrite functions with yield · Understand why generators save memory · Use generators with next(), for and sum()
32Decorators30 minutesPass functions around as values · Write your own decorator · Extend a function with @
33Type hints20 minutesLabel parameters and return values with types · Read list[int], dict[str, int] and optional values · Use dataclasses for simple data objects
34async and await30 minutesUnderstand what “waiting at the same time” means · Work with async def, await and asyncio.run · Run several tasks in parallel with asyncio.gather
35Boss level: the data pipeline60 minutesUse generators, decorators and type hints together · Skip faulty data robustly · Write professional, readable code

Robotics with LEGO SPIKE

Select for the class link✓#LessonTimeGoals
1Your first Pybricks program20 minutesImport Pybricks building blocks · Control the hub with scrolling text, light and icons · Add pauses with wait()
2Driving with the DriveBase30 minutesCombine two motors into a DriveBase · Drive precisely with straight(), turn() and arc() · Watch movements on the side with wait=False
3Sensors – colour, distance, force30 minutesRead the colour sensor, ultrasonic sensor and force sensor · Use the pattern “measure, check, react” · Combine driving and measuring
4Following lines with a P controller30 minutesUnderstand why on/off steering jerks around · Build a P controller from error and gain · Tune KP and speed sensibly
5Buttons and gyro sensor25 minutesWait for a button press on the hub · Measure the heading with the gyro sensor · Calculate the shortest turn angle with modulo
6Display and sounds25 minutesBuild your own image as a list of lists · Control single pixels and their brightness · Calculate a status display from measurements · Play sounds and melodies
7Calibrating30 minutesUnderstand why real robots never drive perfectly · Measure the distance with the distance sensor and the turn with the gyro · Recalculate wheel_diameter and axle_track correctly
8Moving to the real SPIKE30 minutesPut Pybricks onto the SPIKE hub · Transfer programs from the simulator to the real robot · Measure sensor values before the first run instead of guessing

JavaScript

Select for the class link✓#LessonTimeGoals
1Hello, JavaScript!25 minutesPrint something with console.log() · Create variables with let and const · Build text with template strings
2Decisions with if25 minutesBranch with if, else if and else · Compare values with === · Combine conditions with && and ||
3Loops30 minutesCount with for · Repeat with while as long as something holds · Add up results in a loop
4Arrays – many values at once30 minutesCreate arrays and read values by index · Add values with push and go through them with for…of · Process arrays with filter and map
5Functions30 minutesWrite functions with function · Return values with return · Use arrow functions (=>)
6Objects30 minutesCreate objects with properties · Read and change properties · Work with arrays of objects
7Project: guess the number35 minutesAsk for input with prompt() · Turn text into numbers with Number() · Build a complete game with while, if and counters
8Your own web page: HTML and CSS35 minutesWrite a web page with a heading, paragraphs and lists in HTML · Set colours, spacing and font sizes with CSS · Style several elements the same way with classes
9Web pages with JavaScript: DOM and clicks40 minutesFind an element on the page with document.querySelector · Change the text and look of an element with JavaScript · React to clicks with addEventListener
10Drawing with canvas35 minutesPaint rectangles and circles on a drawing area (canvas) · Draw patterns with loops · Change a drawing with a click
11Project: click hunt in the browser45 minutesPut an element at a random place with JavaScript · Make a clock count down with setInterval · Combine HTML, CSS and JavaScript into a finished game

Robotics with fischertechnik

Select for the class link✓#LessonTimeGoals
1The TXT 4.0 and ftrobopy25 minutesKnow the M, O, I and C ports of the TXT 4.0 · Connect to the TXT with ftrobopy · Give feedback with print() and a lamp
2Controlling XS motors30 minutesRun an XS motor forwards and backwards with setSpeed() · Drive an exact distance in encoder pulses with setDistance() · Wait with finished() until a movement is complete
3Lamps and buttons30 minutesSwitch lamps on O1 to O8 on and off and dim them · Read a button on an I input · Understand the reversed logic of state() (0 = pressed)
4Line tracker and phototransistor30 minutesDetect with the line tracker whether a line is under the sensor · Measure brightness as a voltage in mV with the phototransistor · Collect readings in a list and analyse them
5Project: Traffic light control45 minutesProgram a traffic light as a sequence of states · Keep the code readable with small helper functions · React to a pedestrian request with a button

Programming games

Select for the class link✓#LessonTimeGoals
1Your first game: shapes, loop, keys30 minutesDraw shapes and text on a game area · Understand how a game loop works frame by frame · Steer a figure with the arrow keys and keep it inside the window
2Project: catch game45 minutesMake things appear at random places with random · Check whether two rectangles touch (collision) · Count points, take away lives and end the game with game.stop()
3Project: snake game60 minutesBuild a game area made of squares with game.grid() and game.cell() · Store a snake as a list of positions and let it grow · Change direction with game.pressed() and detect the end of the game
4Project: paddle duel60 minutesMove a ball with a speed in x and y direction · Let the ball bounce off walls and paddles · Program a simple computer opponent

Exploring computer science

Select for the class link✓#LessonTimeGoals
1Binary numbers, bits and bytes35 minutesUnderstand why computers only calculate with 0 and 1 · Convert numbers between the decimal and the binary system · Know how letters are stored as numbers
2Secret codes – Caesar and Vigenère45 minutesUnderstand and program the Caesar cipher · See why Caesar is easy to crack · Encrypt more securely with a keyword using Vigenère
3Pictures are made of pixels40 minutesStore a picture as a list of rows with brightness values · Understand how colours are made from red, green and blue · Program your own image filters
4How does a search engine work?45 minutesUnderstand why search engines don't read every page one by one · Build an index of words and pages · Use sets to find pages that contain several words
5How fast is an algorithm?40 minutesCount a program's steps instead of timing it · See how the number of steps grows when the data gets twice as big · Replace a slow algorithm with a fast one

Class overview – without a server

1. Students go to “My progress” → “Save as file” and give you the file (e.g. via your school's learning platform), ideally with their name in the file name.
2. Select all files here at once. They are only read in your browser – nothing is uploaded or stored.

🏁 Class leaderboard for the robotics challenges

Students send you their links from “Share time”. Paste them here – one per line, “Name: link”. Every time is re-checked in the simulator, so faked times stand out. Everything happens only in your browser.