Circuit Quest: Power the Grid

Python
Jupyter
circuits
game
Rotate circuit tiles, light the lamps, and learn how complete paths and branches work.
ImportantPlay first

Finish the three levels and make one small code change. Then move to the Life Checkpoint assignment.

Open the game

Fastest method

  1. Click PLAY CIRCUIT QUEST IN JUPYTERLITE.
  2. Choose Python (Pyodide) if Jupyter asks for a kernel.
  3. Run the setup cell.
  4. Change the team name and one colour in Make it yours.
  5. Run the play cell and finish all three levels.

Download and upload method

If the direct link does not open the notebook:

  1. Download Circuit Quest (.ipynb).
  2. Open JupyterLite.
  3. Select Upload Files and choose 09a-circuit-quest.ipynb.
  4. Double-click the uploaded file and choose Python (Pyodide).

What to do

  1. Change TEAM_NAME.
  2. Change one colour word. Try hotpink, orange, violet, gold, cyan, or lime.
  3. Run the play cell.
  4. Click a wire tile to rotate it. Connected tiles glow green.
  5. Light every lamp. Use Hint or Reset level if needed.

The game contains three small levels:

Level Goal
1. One turn to power Rotate one wire and light one lamp.
2. Route around the corner Build a complete path through a 3 by 3 grid.
3. Power two lamps Rotate a junction and power two branches.
NoteYour code is part of the game

The game displays the team name and colours you put in the code. Leave the collapsed game engine alone for now.

What happens next

Circuit Quest is the warm-up. Do not rebuild the tile board in Tinkercad.

  1. Open the Life Checkpoint Upgrade instructions.
  2. Open the Life Checkpoint notebook and correct the checkpoint work in Jupyter.
  3. Build the checkpoint’s two-loop circuit in Tinkercad: \(12\,\mathrm{V}\) and \(5\,\mathrm{V}\) sources with \(5\,\mathrm{k\Omega}\), \(7\,\mathrm{k\Omega}\), and \(2\,\mathrm{k\Omega}\) resistors.
  4. Compare the Tinkercad currents with the Python answers.

OPEN THE LIFE CHECKPOINT ASSIGNMENT

Troubleshooting

Problem Fix
No board appears Run the setup, team-and-colours, and play cells in order.
Buttons appear as plain text Select Python (Pyodide) as the kernel.
A lamp stays off Follow the green path and rotate the first blue tile after it.
You cannot find the mistake Select Hint.
You want to start over Select Reset level.
The browser was closed Reopen or upload the notebook and run both game cells again.

Source note

The activity adapts the rotating-tile idea used by circuit-path and Netwalk-style puzzles. It uses ipywidgets; the setup cell installs it automatically when the browser environment does not already have it. The circuit levels and notebook implementation are original course materials.

Help improve this lesson (optional)

If a button, colour, instruction, or level is unclear, show the exact problem to the teacher and suggest one specific improvement.