This project has been excerpted and modified from Make: Getting Started with Raspberry Pi – 2nd Edition.

What You’ll Be Making

You’ll create a very simple counting program using Python. Python is considered an “interpreted language,” which means that you can write a program or script and execute it directly rather than compiling it into machine code. Interpreted languages are a bit quicker to program with, and Python comes with a few side benefits of its own. For example, in Python you don’t have to explicitly tell the computer whether a variable is a number, a list, or a string; the interpreter figures out the data types when you execute the script.

The Python interpreter can be run in two ways: as an interactive shell to execute individual commands, or as a command-line program to execute standalone scripts. The integrated development environment (IDE) bundled with Python and the Raspberry Pi is called IDLE. You’ll learn the basics of Python through this mini project.

If you aren’t familiar with what a shell is, it is a user interface for accessing an operating system’s services. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer’s role and particular operation.

What You’ll Learn

  • The basics of Python, a programming language
  • How to put chunks of code into functions for easy re-use
  • Working with variables and loops