Free learning guide

Python beginner guide

Start with variables, selection, iteration and small programs.

Begin with print("Hello, world!"), then create a variable such as score = 10. Try changing the value and printing the result. Next, explore if statements and for loops.

Practice

Write a program that asks for a name and prints a greeting. Extension: ask for a number and display its double.

← Browse all resources

Python practice projects

Build your programming skills using our free starter files and reference solutions.

Explore Python resources →

A sensible order for learning Python

Start by displaying text and storing values in variables, then practise input, selection and repetition. Functions make larger programs easier to read and test. In each lesson, predict the output of the example before running it, and then deliberately change one line.

Begin with our 12-lesson Python Foundations course, including downloadable code and a short knowledge check for every topic.