Tokbit for teachers

Tokbit is a free web app for teaching algorithms. Students build a flowchart, step through it and see how the program thinks – variables, branches and output on a retro screen. It runs in the browser on a computer, tablet or phone, with nothing to install and no sign-up.

Where next

Curriculum and ISO 5807

The curriculum content explicitly names finding errors by stepping through a program and the flowchart – both are at the heart of Tokbit.

The PRIMM approach: students work with an example in five steps – predict what the program will do, run it, investigate it by stepping, modify it and finally make their own. A task identical to an example invites copying; the best check of understanding is “before each step, say what will happen”.

Run your program in Python

Programs from Tokbit also run in Python: Export → Python downloads a ZIP with the program, the tokbit.py library (MIT licence) and instructions. The window looks like the Tokbit screen.

  1. Install Python 3 from python.org (on a Mac use the one from python.org, not the system one; on Windows tick “Add python.exe to PATH” during installation).
  2. Unzip the downloaded ZIP: the whole folder, not just one file. The program and tokbit.py must be side by side.
  3. Open the program from the folder in IDLE (it comes with Python) and press F5, or type python3 program.py in a terminal (on Windows py program.py).
  4. A window with a 40 × 25 screen opens, just like in Tokbit. Without a window, only in the console: TOKBIT_TEXT=1 python3 program.py.

Contact

Author: Petr Mašek. Feedback from your lessons is welcome.

Send feedback