Guide · Python basic course
Python – the basic course
The basic course leads from the installation and the first program to functions and modules. At the end of every unit there are mini tasks and a quiz.
The course is meant for students from grade 5. After it you move on to MicroPython and the micro:bit, and then to graphics in py5.
- Grades 5–8
- Thonny
- 26 lessons
Some lessons linked below are available only in Serbian for now. They are marked (SR).
1 First steps
Installation, printing and calculating.
Installation and the first run (SR)
Learn Python step by step: installation, the Thonny IDE, print(), comments and the first mini tasks for students.
Open lesson →The first program – print() and comments (SR)
Learn how to use print() and comments in Python through short examples and mini tasks.
Open lesson →Arithmetic operations (SR)
Learn the basic arithmetic operations in Python: +, -, *, /, //, %, **.
Open lesson →Mini projects: a calculator and exercises (SR)
Try simple mini projects in Python for beginners: a calculator, a program for the first and last name, computing age…
Open lesson →2 Data and input
Variables, types, input and printing text.
Variables and data types (SR)
Learn what variables are in Python, which data types exist (int, float, string, bool) and how they are used in practice.
Open lesson →Input – input() (SR)
Find out how input() works in Python, how text and numbers are entered, type conversion and practical examples.
Open lesson →Formatting text (SR)
Learn how to use f-strings in Python to format text.
Open lesson →Mini project: age and birthday (SR)
A practical mini project in Python for students: compute the user's age and check their birthday.
Open lesson →3 Branching
How a program makes decisions.
Logical operators and branching (SR)
Learn how to use branching in Python with if, elif and else, master the logical operators and solve mini tasks.
Open lesson →Branching – if, elif, else (SR)
Branching in Python, if, elif, else, logical operators and mini tasks for beginners.
Open lesson →Mini tasks: temperature and a quiz (SR)
Learn how to use if, elif and else in Python through mini tasks with temperature and a quiz.
Open lesson →4 Loops and lists
Repetition and working with several pieces of data.
for and while loops (SR)
Learn how for and while loops are used in Python.
Open lesson →Iterations and basic algorithms (SR)
Learn Python iterations through basic algorithms: adding numbers, finding the maximum, counting elements and tasks.
Open lesson →Mini tasks – loops (SR)
Short and clear mini tasks for practising for and while loops in Python.
Open lesson →Arrays and lists (SR)
Learn how to use lists in Python, go through the elements, add and remove values, and solve mini tasks.
Open lesson →Mini project – Guess the number (SR)
Learn to make a game.
Open lesson →5 Functions and modules
Dividing a program into parts.
Introduction to functions (SR)
An introduction to functions in Python for beginners.
Open lesson →Parameters and return values (SR)
Learn how functions in Python receive data through parameters and how they return a result with return.
Open lesson →Variable scope (SR)
Learn what local and global variables are in Python, how Python determines the scope of variables and when to use global.
Open lesson →Modules and import (SR)
Find out how to organize Python code in modules, how to use import to reuse functions, aliases and different forms of import.
Open lesson →Project: refactor Guess the number (SR)
In this project take the earlier code of the game "Guess the number" and divide it into functions and at least two files.
Open lesson →Organizing a program into modules (SR)
In this mini project you will learn how to organize your Python program into several files (modules).
Open lesson →6 Mini projects
Final projects of the basic course – preparation for the micro:bit.
Score counter and statistics (SR)
In this project we will make a simple program that tracks points during a game and keeps statistics in a list.
Open lesson →Text menu (SR)
In this project we will make a text menu that offers the user several options.
Open lesson →Traffic light simulation (SR)
This project simulates a traffic light by printing text.
Open lesson →Final project – a digital counter (SR)
In this final mini project we will make a digital counter – a program that remembers one number and lets you change that value.
Open lesson →7 What next
The next units of the Python course.
