Chapter 12

An Introduction to Python

THE RASPBERRY PI gets the first half of its name from a long-standing tradition of using fruit to name new computing systems—from classic microcomputers like the Acorn, Apricot and Tangerine to more recognisably modern brands including Apple and BlackBerry—but the second half comes courtesy of the Python programming language.

Introducing Python

Flexible and powerful, Python was originally developed in the late 1980s at the National Research Institute for Mathematics and Computer Science by Guido van Rossum as a successor to the ABC language. Since its introduction, Python has grown in popularity thanks to what is seen as a clear and expressive syntax developed with a focus on ensuring that code is readable.

Python is a high-level language. This means that Python code is written in largely recognisable English, providing the Pi with commands in a manner that is quick to learn and easy to follow. This is in marked contrast to low-level languages, like assembler, which are closer to how the computer “thinks” but almost impossible for a human to follow without experience. The high-level nature and clear syntax of Python make it a valuable tool for anyone who wants to learn to program. It is also the language that is recommended by the Raspberry Pi Foundation for those looking to progress from the simple Scratch (described in Chapter 11, “An Introduction to Scratch”) to more “hands-on” programming.

Python is published under an open-source licence ...

Get Raspberry Pi User Guide, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.