Want to keep learning?

This content is taken from the Raspberry Pi Foundation & National Centre for Computing Education's online course, Programming 101: An Introduction to Python for Educators. Join the course to learn more.
A photograph of a woman coding at a laptop

What you will need

To create Python programs you need a text editor to write your code and a Python interpreter which takes your code and runs it.

An editor, interpreter and other useful tools (such as a file browser) are often bundled together into an Integrated Development Environment (IDE), which makes the process of creating programs much easier.

You will be using an IDE to create, run and test your Python programs. You can install an IDE on your computer, or you can use an internet browser to access an online IDE. An installed IDE has the benefit of being able to work when you are not connected to the internet. On the other hand, an online editor doesn’t require anything to be installed.

Instructions are provided below for an installed IDE called Mu and for the online IDE Trinket.

There are three key areas to the Mu and Trinket IDE’s:

  • Files: this is where all your programs will be stored. Each filename will end in .py meaning that the file is a Python file.
  • Editor: this is where you will create your programs.
  • REPL stands for “Read-Eval-Print Loop” (for reasons that will become clear). Your program will run in the REPL, which is where you will see any output and provide any input.

An image of the Mu editor, with a file tab, the editor and the REPL labelled.

An image of a trinket window, with a file tab, the editor and the REPL labelled

If you have permission to install software on your computer, I would recommend you download and install the IDE Mu.

If you can’t install software on your computer but can access the internet, you can use the online IDE Trinket.

Mu

Mu is available to download at the website codewith.mu where you will also find comprehensive installation instructions.

The codewith.mu website with the download link highlighted

The codewith.mu download page

Here you will find easy to follow instructions to download, install and start Mu:

Linux users (other than Raspbian) should follow the Install with Python packaging instructions.

  • When Mu starts for the first time, select the Python 3 mode and click OK.

The Mu IDE on the select mode screen with Python 3 highlighted

If you experience problems or would just like to know more about Mu, have a look at Raspberry Pi’s Getting started with Mu guide.

Trinket

Trinket can be accessed via any modern web browser at trinket.io.

  • Open trinket.io and Sign Up for a free account or Log In if you already have an account.

The trinket website with the sign up and log in links highlighted

  • Complete the sign up form.

trinket website sign up page

Share this article:

This article is from the free online course:

Programming 101: An Introduction to Python for Educators

Raspberry Pi Foundation