Writing Python Offline

Python offline

We recommend using Trinket to write Python online, as it has a number of advantages:

  • Children can save projects within Trinket, and access them both inside and outside of their Code Club sessions without needing to download and install software;
  • Children can easily share projects with others, giving them a platform for their work. They can easily elicit feedback from others, as well as providing feedback to their peers.

However, it may be that you are not able to use Trinket, especially if you are using computers without an Internet connection.

Downloading and installing Python

You can use this link to download version 3.2 of Python.

Writing and running a simple Python program

Installing Python will also install the IDLE Python editor, which is the simplest way of writing and running Python programs. IDLE consists of 2 windows, the editor (where programs are written) and the ‘Shell’ (where programs are run).

IDLE Editor
IDLE Editor

When IDLE is run, you will probably see the Python Shell window. You can open a new editor window by clicking ‘File → New Window’. Once you have written your program, you should save it (remembering to add .py to the end of your filename).