Guide · Python and Processing
Python and Processing – Creative Programming
Creative programming: drawing, animations, games, data visualization and projects in which the micro:bit controls graphics.
The goal of this unit is that at the end you can make your own project and write a creative programming paper for a competition.
- Grades 5–8
- Thonny + py5
- up to a competition paper
Some lessons linked below are available only in Serbian for now. They are marked (SR).
1 The environment and the first sketch
We recommend Thonny with the py5 plug-in; the old examples also work in Processing Python Mode.
Introduction to Python and Processing (SR)
An introduction to Python and Processing 4 (Python Mode).
Open lesson →py5 in Thonny (recommended environment) (SR)
The recommended environment: Thonny + the py5 plug-in, a table of differences from Python Mode.
Open lesson →Installation – Processing Python Mode (SR)
A step-by-step guide to installing Processing 4 and Python Mode.
Open lesson →The first sketch and the coordinate system (SR)
Learn how to make the first Processing sketch in Python.
Open lesson →2 Drawing, animation and interaction
Shapes, colours and images (SR)
Learn how to use fill(), stroke(), strokeWeight() and noStroke() in Processing Python Mode.
Open lesson →Animation and variables (SR)
Learn how to create an animation in Processing Python Mode using variables for the position of objects.
Open lesson →Mouse and keyboard (SR)
Learn how to add interaction in Processing Python Mode using mouseX, mouseY, mousePressed and keyPressed.
Open lesson →Simple physics: gravity and bouncing (SR)
Gravity, bouncing, friction and many balls – physics in an animation.
Open lesson →3 The game Pong in four levels
Mini project – Pong (SR)
Learn how to make the simple arcade game Pong using Python Mode in Processing 4.
Open lesson →Pong level 2 – points and restart (SR)
Make the Pong game in Python using Processing.
Open lesson →Pong level 3 – physics and 2 players (SR)
An advanced Pong game in Python using Processing.
Open lesson →Pong – OOP version (SR)
Make an OOP version of the Pong game in Python Processing.
Open lesson →4 Lists and charts
Arrays and lists in animations (SR)
Learn how to use arrays and lists in Python Processing.
Open lesson →Drawing charts (SR)
Learn how to draw bar charts in Python Processing using lists and for loops.
Open lesson →An interactive chart (SR)
Learn how to make an interactive chart in Python Processing that reacts to the mouse and shows data values.
Open lesson →Loading data from a CSV file
A chart made from data in a table (e.g. measurements from the micro:bit).
5 Creative projects and competitions
Generative art (SR)
Generative art in Python Processing – creative programming.
Open lesson →Final project: a micro:bit controller (SR)
Learn how to use the micro:bit as a game controller in the Processing Python Mode environment.
Open lesson →Projects for competitions (SR)
Examples of Python projects for school and competitions using Processing.
Open lesson →A creative programming paper (SR)
From the idea to the application: a work diary, the structure of the paper and its defence.
Open lesson →Exporting and presenting a project (SR)
Learn how to export and present a Python Processing project.
Open lesson →