How to begin programming in Python
You’ll get the best experience learning Python by downloading an IDE (an Integrated Development Environment is the thing you type your programs into). Which one?
- Mu is a brilliant IDE designed for people new to Python, visit the Mu site to download it. We use Mu for our games programming tutorials (see below).
- Alternatively you can download and install Python from the official Python website and use IDLE3. This might be better for experienced Python programmers.
Another option, if you don’t want to install anything, is to use an online IDE:
- Repl.it is an excellent online IDE. You will need an email to login but the advantage of an online IDE is that you can still access and run your code on a school PC or laptop even if they don’t have Python installed.
Learning the Python language
Repl.it have a Python classroom this gives you lots of programming challenges to try for yourself (which would take you through everything you need to know for programming in the GCSE syllabus!). We are also working on some Coder Dojo Brighton tutorials using Repl.it, and the first is:
- Python Text Adventure: create a world of your own for players to explore, and get to know the Python language: learning about functions, if-statements and data structures.
Snakify have a really good Python course. Again this will take you through all of the basics in Python
Code Academy is also a nice site for learning Python. It has been around for a long time and it’s well written but various exercises are now behind a paywall – however most of it is still free!
W3 Schools also has a very good Python Tutorial. Not only does it teach you Python but it’s a really nice reference site too.
Making games with Mu
The Mu editor has everything you need to create great games. Try out one of these tutorials to find out more. (Unfortunately you can’t use these tutorials with IDLE3 or Repl.it.)
- Flappy Bird Pygame Zero Tutorial – a great first game tutorial including information on how to download and set up Mu together with Python.
- Burgers Pygame Zero Tutorial – make a game about catching falling ingredients and building burgers.
- Candy Crush Pygame Zero Tutorial – this builds on the skills in Flappy Bird and includes loops, arrays and more advanced logic.
- Pac-Man Pygame Zero Tutorial – again building on the skills learnt in the previous tutorials this covers files, dictionaries and (soon) some basic Artificial Intelligence.
More links and resources…
- TkGameLib – If you can’t install Mu or want to explore more games and examples then this simple games library runs on default Python install with Tkinter for graphics.
- Hangman Python Template
- Hangman Slides
- Link to Python Number Guess
- Link to HTML and CSS
- Little Pythoner