O'Reilly logo

The Official BBC Micro:bit User Guide by Gareth Halfacree

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7

Python

In this chapter

check An introduction to programming in the Python Editor

check ‘Hello, World!’: Your first Python program

check Programs for reading from button inputs, touch inputs, and the temperature, accelerometer, and compass sensors

check 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required