By Kevin McAleer, 8 Minutes
Page last updated November 24, 2026

By the end of this lesson you will be able to install Python, run a program from your editor and from a terminal, and explain what the course will cover.
Ahoy there makers! Python is the language behind a huge number of robots, 3D printer tools, data projects and Raspberry Pi gadgets. It reads almost like plain English, so it is a friendly first language, and it is powerful enough that you will not outgrow it.
This course takes you from your very first line of Python to a small working application. The first half covers the core language: variables, data structures, control flow, files, errors, modules and classes. The second half is a guided tour of what people do with Python in the real world, from web scraping and charts to machine learning, automation and databases. Each tour lesson gives you one small, complete program to run, and points you to a deeper course when you are ready for more.
This is the first course in the Python learning pathway. Everything here is ordinary computer-side Python (called CPython). If you want to run Python on a microcontroller, Learn MicroPython - The basics is a good next step, because it builds on what you learn here.
pip and virtual environmentsflowchart LR
A[Install Python] --> B[Core language]
B --> C[Files, errors, modules, classes]
C --> D[Real world tour]
D --> E[Quiz project]
E --> F[Next courses]
After completing this course, you will:
Each lesson teaches one idea and opens with a sentence starting “By the end of this lesson you will be able to…”. Code appears in boxes. Where a box has a Run button you can run it right in your browser, no install needed, and edit it and run it again. Boxes without a Run button need a real Python install (usually because they use a library, a webcam, a network or your own files), so save them to a file and run them on your computer.
Every lesson ends with Try it Yourself exercises of rising difficulty, a Common Issues list for when things go wrong, and a short quiz. Your progress and quiz score are saved in your browser and shown in the sidebar.
Teachers: This course suits learners aged about 11 and up with no coding experience, working alone or in pairs. Allow 30 to 45 minutes per lesson. No electronics are needed. Lessons 1 to 8 (the core language) can be completed in the browser using the Run buttons, so they work on locked-down school machines with no install. Lessons 9 to 15 mostly need Python and the ability to install libraries, so check with your IT team first: some schools block
pipand the websites it downloads from. Installing needs administrator rights on Windows and macOS, and a school network may block the downloads.
Python is one of the most popular programming languages in the world because of its simplicity and readability. Here are some reasons to learn it:
Before you can run Python on your own computer you need the Python interpreter, the program that reads your code and carries it out.
PATH, tick it, so you can type python in a terminal.Already installed?
macOS and Linux (including Raspberry Pi OS) usually come with Python 3. Open a terminal and type
python3 --versionto check. On Windows trypython --versionorpy --version.
You will also need somewhere to write code. A plain text editor works, but Thonny, VS Code and PyCharm all add helpful extras such as colour and error hints. Thonny is the simplest for a first week, and it is already on Raspberry Pi OS.
Let’s write the classic first program. Press Run to try it right here:
To run it on your own computer:
hello_world.py.python hello_world.py and press enter. On macOS and Linux, use python3 hello_world.py.You should see Hello, World! printed. You have just written and run a program.
print() line. Each print() starts a new line.print() calls, such as Beep, Boop, Ready for orders.python is not recognized or command not found.python3 (macOS and Linux) or py (Windows). If none work, run the Python installer again and tick the option to add Python to your PATH.Why: The terminal can only run programs it can find, and PATH is the list of places it looks.
SyntaxError: unterminated string literal.Why: Python reads text between quotes as a string, and a missing quote means it never finds the end.
python hello_world.py says No such file or directory.cd), or give the full path.Quick quiz 1 of 3
Which of these prints a message in Python?
print() is Python’s built-in function for showing text. The others come from other languages.Quick quiz 2 of 3
What file extension do Python programs use?
.py.Quick quiz 3 of 3
On macOS and Linux, how do you check whether Python 3 is installed?
python3 --version prints the installed version, or an error if Python 3 is missing.You now know why Python is worth learning, how to install it, and how to write and run a program. In the next lesson we will meet variables, the containers that hold your data.
Comments