Skip to content

Python

To avoid having to setup a local Python development environment, a good way to get started with Python is to use an online IDE. These can be used from pretty much any device including Windows PCs, Macs, Linux, Raspberry Pi, Android tablets or iPads. At my Code Club I use replit which has a free tier. See the replit guide to get started.

MakeCode Arcade also allows you to write your games in Python.

Books

There are a huge range of resources out there for Learning Python and it can be daunting for beginners to identify which are worth their investment in time or money. I recommend the following resources:

Python in easy steps is a concise and low cost overview of the language and the book I use with my learners during Python sessions. The Python challenges I have written contain references to the relevant sections in this book.

The following books are all written by Al Sweigart and available free on his website https://inventwithpython.com. Print versions are available direct from the publisher or Amazon for a fee. There are a range of books covering several topics and 4 that I recommend for Python are:

Invent Your Own Computer Games with Python

Python Programming Exercises, Gently Explained

Making Games with Python & Pygame

The Big Book of Small Python Projects

Code Club Python

Module 1

1 - About Me

2 - Rock, Paper, Scissors

3 - Turtle race

4 - Team Chooser

5 - Colourful Creations

6 - Secret Messages

Module 2

1 - Modern Art

2 - Popular pets

3 - RPG

4 - Where is the Space Station

5 - Robo-Trumps

6 - CodeCraft

Challenges

The following materials are designed for self-directed learning once comfortable with writing Python scripts. I recommend only starting the challenges once you have completed Modules 1 and 2 above. Each of the challenges contain references to the book Python in easy steps and I recommend purchasing a copy (though it is not essential).

1 - Guess the number

2 - Higher or lower

Coding Games with Pygame Zero & Python

The following materials are provided freely online by Richard Smith and take the reader from the fundamentals of Python to writing games using Pygame Zero. The website is available here.

4 - Drawing graphics

5 - Arcade games

6 - Improving your games

7 - More advanced games

8 - Tutorial: Chase game

9 - Tutorial: Maze game

10 - Tutorial: Shooting game

11 - Tutorial: Race game

More Games with Pygame Zero

I have written the following Pygame materials which are designed to be followed after working through the Code Club Python materials. The reader should have a moderate grasp of Python. All of these materials have been designed to work with the online programming IDE replit.

1 - Muncher

2 - Bugs, coming

3 - Paint, coming

4 - Pairs, coming

5 - Smash, coming

6 - Memory, coming

7 - Stack, coming

8 - Attack, coming

9 - Fireworks, coming

10 - Jumper, coming

MakeCode Arcade Python

MakeCode Arcade also allows you to write your games in Python (though it is more limited than Replit and not as mature as the MakeCode Arcade TypeScript tooling). The materials that I initially produced highlighted some issues with the early access Python tooling so we stopped using it. In time, I'm sure the tooling will mature enough for us to use it again. The materials are marked as alpha, beta or final based on the quality/stage of development of the material. The alpha materials will be first stage PDFs, beta are updated web based materials but not neccessarily battle tested in the Coding Club yet so may contain errors and final will be the tested materials.

1 - OXO, alpha

2 - Invaders, alpha

3 - Smash, alpha

4 - Frog, coming

5 - Muncher, coming