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

Sample PyGame

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

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