Coding Club
Learn Python from your first lines of code to a small Pygame runner game. Everything here is free to work through at your own pace.
How to use this site
- Lessons - Read each unit in order. They introduce ideas in small steps with short activities.
- Practice Tasks - Extra problems grouped by units to apply what you learn from the lessons section.
- Tutorials - Optional guided projects spanning multiple steps. Open these when you want to build something bigger.
Resources - Python, Pygame, install tips, and more
Lessons
Read these in sequence within each unit before moving on.
Unit 1 - Basics
- 1.1 Types of data - Integers, floats, strings, booleans, and checking types with
type().
- 1.2 Variables - Naming values, assignment,
print(), and input().
- 1.3 Operators - Maths, comparisons, and logical
and / or / not.
Unit 2 - Control flow
- 2.1 Conditionals -
if, elif, else, and why indentation matters.
- 2.2 Loops -
while, for, break, random, and the higher-lower guessing game.
Unit 3 - Data structures
Unit 4 - Functions
Unit 5 - Pygame and your first game
- 5.1 Pygame setup and the game loop - Install Pygame, open a window, handle quit, redraw each frame.
- 5.2 Coordinates and drawing - Screen coordinates,
Rect, and drawing shapes.
- 5.3 Keyboard input and moving a rect - Arrow keys, moving the player, staying on screen.
- 5.4 Collision and game logic -
colliderect, obstacles, and scrolling.
- 5.5 Building a runner game - Jump, gravity, scoring, Chrome Dino-style loop.
Practice tasks
Unit 2
- Unit 2 tasks - Conditionals, loops, and
input: menus, games, maths stories, and stretch problems, each with a solution page.
Unit 3
- Unit 3 tasks - Lists and dictionaries: playlists, tallies, menus, slices, and a mixed list-plus-dict voting task, each with a solution page.
Unit 4
- Unit 4 tasks - Functions: parameters,
return, booleans, loops inside def, and a three-question addition quiz, each with a solution page.
Tutorials
Each link goes to a tutorial hub with steps. Use these alongside or right after the matching unit.
Unit 1
Unit 2
Unit 3
Unit 4
Unit 5