Advancing
As your programs become more advanced, blocks based programming can become more challenging to use as the programs can get large and unwieldy. At this point you will want to transition from blocks to text based programming. One of the best languages to use to make this transition is Python. When starting out with Python, it is useful to have a book to use as a reference. Please See my recommended books on Python in books.
Online IDE, Replit
The easiest way to get started writing Python is to use an online IDE which helps minimise the barrier to entry as no software needs to be installed. My favourite and recommended online IDE is Replit and is what I use at my Code Club as it has a free tier. Replit can also be used from pretty much any device including Windows PCs, Macs, Linux, Raspberry Pi, Android tablets or iPads. Head over to my Replit guide to get started.
An Introduction to Python
For a gentle introduction to Python, start with the Code Club Python materials.
Module 1
1 - About Me
3 - Turtle race
4 - Team Chooser
6 - Secret Messages
Module 2
NOTE: Some of these materials do not play nicely with Replit.
1 - Modern Art
2 - Popular pets
3 - RPG
4 - Where is the Space Station
5 - Robo-Trumps
6 - CodeCraft
Going Further with Python
These projects are a curated list of projects and exercises from Al Sweigart books. The materials are excellent and have been generously made freely available online. If you find them useful and use them, please consider supporting Als generosity by purchasing his books or donating on his website here. Each of the modules below contains some exercises, projects and games. It is recommended that you have already completed Code Club Python before starting these. A longer list of 8 modules can be found at Al Sweigart.
Module 1 - Al Sweigart
1 - Project: #15 Deep Cave, The Big Book of Small Python Projects
2 - Project: #3 Bitmap Message, The Big Book of Small Python Projects
3 - Project: #2 Birthday Paradox, The Big Book of Small Python Projects
4 - Exercise: #2 Temperature Conversion, Python Programming Exercises, Gently Explained
5 - Exercise: #3 Odd & Even, Python Programming Exercises, Gently Explained
6 - Game: Tic-Tac-Toe, Invent Your Own Computer Games with Python
Module 2 - Al Sweigart
1 - Project: #10 Cho-Han, The Big Book of Small Python Projects
2 - Project: #7 Caesar Hacker, The Big Book of Small Python Projects
3 - Project: #5 Bouncing DVD Logo, The Big Book of Small Python Projects
4 - Exercise: #4 Area & Volume, Python Programming Exercises, Gently Explained
5 - Exercise: #5 Fizz Buzz, Python Programming Exercises, Gently Explained
6 - Game: Sonar Treasure Hunt, Invent Your Own Computer Games with Python
Module 3 - Al Sweigart
1 - Project: #8 Calendar Maker, The Big Book of Small Python Projects
2 - Project: #9 Carrot in a Box, The Big Book of Small Python Projects
3 - Project: #13 Conways Game of Life, The Big Book of Small Python Projects
4 - Exercise: #9 Chess Square Colour, Python Programming Exercises, Gently Explained
5 - Exercise: #10 Find and Replace, Python Programming Exercises, Gently Explained
6 - Game: The Reversegam Game, Invent Your Own Computer Games with Python
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.
Module 1
1 - Muncher (Pac-Man)
2 - Smash (Breakout)
2a - List comprehensions
3 - Stack (Tetris), coming
4 - Pairs, coming
5 - Bugs (Whac-A-Mole), coming
5b - Improving collision detection, coming
6 - Aliens (Galaxian), coming
7 - Toad (Frogger), coming
Module 2
1 - Paint, coming
2 - Invaders (Space Invaders), coming
3 - Fireworks, coming
4 - Jumper (Mario Bros), coming
5 - Concrete (Cement Factory), coming
6 - Sandwiches (Burger Time), coming
7 - Collision (Geometry Wars/Asteroids), coming
Python Challenges
If you feel confident in your Python abilities, have a go at my Python 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
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 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 necessarily 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
CircuitPython
Now is time to move onto the Raspberry Pi Pico with CircuitPython! This takes you on a journey of physical computing where you write Python code to control microcontrollers. Head over to CircuitPython.