In this chapter
An introduction to programming in the Python Editor
‘Hello, World!’: Your first Python program
Programs for reading from button inputs, touch inputs, and the temperature, accelerometer, and compass sensors
Fruit Catcher: A simple game to program and play on your BBC micro:bit
THE PYTHON PROGRAMMING language, named not for the snake but for the comedy troupe Monty Python, started life in 1989 as a hobby project of developer Guido van Rossum. Since its official release in1991, Python has grown in popularity thanks to its flexibility and a beginner-friendly format free of the need for hundreds of curly braces or semicolons you find in rival languages. Instead, Python makes heavy use of whitespace—space or tab indentations—to control where blocks of code begin and end.
Technically speaking, the BBC micro:bit is not programmed in Python itself but a variant of the language designed specifically for the BBC micro:bit and other microcontroller-based development and educational boards: MicroPython. MicroPython is a version of Python created by Damien George ...