PlatoPod Try it now Book a demo

First programs in Python

Room TLQGNR. An example of where it fits: ZEIT1307 Computational Problem Solving, at UNSW Canberra. Notebook: first-programs.ipynb.

A first program that moves something real, then the first lesson in why programs that control things need feedback.

What students do

  1. Drive straight for 3 s at 0.1 m/s and measure how far the pod went.
  2. Turn a quarter turn by time: 0.8 rad/s for (π/2)/0.8 s.
  3. A square by time: four sides, four turns. It does not close.
  4. The same square by feedback: turn until the heading is right, drive until the distance is right.
  5. Your turn: any polygon, a spiral, a star, and back to where you started.
SquareMissed its start by (three runs on the server, 2026-11-22)
By time21 to 27 cm, heading off by 13° to 58°
By feedback on the pose0.6 to 1.4 cm

The point for students: commands arrive late and unevenly and the pod speeds up and slows down, so a program that trusts the clock drifts, and one that looks at where the pod is does not.

Run it, start to end

You need a laptop with a browser and a steady connection: classroom or home Wi-Fi rather than a phone hotspot.

  1. Download the notebook, first-programs.ipynb.
  2. Open it in one of these:
    • Google Colab, nothing to install: go to colab.research.google.com, then File, Upload notebook, and choose the file.
    • Jupyter on your laptop, with Python 3.10 or later: in a terminal, in the folder you downloaded it to, run python3 -m pip install notebook once, then jupyter notebook first-programs.ipynb.
    • VS Code: open the file, accept the Python and Jupyter extensions it offers, and pick a Python 3.10 or later kernel at the top right.
  3. In the second code cell, change MY_NAME = "your name here" to your name. The room's code is already there.
  4. Run the first code cell. It prints ready: it has fetched the Plato Pod client from the server.
  5. Run the second. It prints You are pod and a number, and a Watch it link. Open the link in a tab beside the notebook to see your pod in 3D.
  6. Run the rest one cell at a time, from the top, reading each section before you run it.
  7. When you are done, run the last cell, arena.close(). It gives your pod back to the room.

If the connection drops for a moment, the notebook connects again by itself and says so. If a cell stops with an error, run it again; if that fails too, choose Restart from the Kernel or Runtime menu and run from the top. Your name gets the same pod back. The room takes six people at a time.