PyRasp

Practice

Practice in the top bar is the archive of problems. Its tabs are Problems (this page), the campaign and the daily problem. Nothing here is timed: there's no clock and no submission, and you can run the tests as often as you like.

New here? The campaign takes you through 48 of these problems in order, as chapters of levels with stars to earn.

The practice sets

166 problems for the Raspberry Pi, grouped by topic. Each set runs from easy to hard:

SetWhat it covers
LEDs & PWMBlinking, fading, patterns and colour: the outputs everything else builds on.
Buttons & inputButtons, switches, keypads and encoders: reading people, debouncing, counting and state.
SensorsLight, temperature, distance, motion, sound and moisture: reading the world and acting on thresholds.
DisplaysCharacter LCDs, OLEDs, 7-segment digits and LED strips: showing numbers, text and patterns.
Motors & actuatorsServos, DC motors, steppers, relays and buzzers: making things move and make noise.
I²C, SPI, UART & 1-WireTalking to chips: ADCs, IMUs, GPS and temperature probes over their buses.
ProjectsSeveral parts working together: small, complete devices.

These are never used as a daily problem. Filter by difficulty or by set at the top of the page.

The Raspberry Pi Pico set

77 problems are solved on a Raspberry Pi Pico in MicroPython instead of on a Pi: pins, timing, buttons, sensors, displays, buses and motors. Their circuit.py starts with pico = Pico(), and the tests run your program on a simulated Pico. They are the exercises of the Pico course; the Pico page covers MicroPython in PyRasp.

Past dailies

Every daily problem joins Practice the day after it runs, under Past dailies, with the date it ran.

Working on a problem

A practice problem opens in the workspace. The Task tab has the statement, the budget and the checks the tests make; the shop and Run tests are there too. See the workspace tour.

  • Run tests runs the checks in your browser. When every check passes the problem is solved, and the list shows a ✓ next to it.
  • The budget still applies. A build that costs more than the budget is reported as Over budget and its program is not tested, so cut the bill and run again.
  • Par is the cost of our own reference build and a target time. After the tests pass, the Results tab compares your build's cost with par.
  • Your best cost and time are kept for each problem you solve; the time counts only while the problem is open on screen.

Your files are saved in this browser as you type, so you can leave a problem and come back later. Your progress is kept in this browser and, when you are signed in, in your account too, so it follows you to other devices.