Python Hello World program
HELLO, WORLD!
from microbit import *
while True:
display.scroll('Hello, World!')
display.show(Image.HEART)
sleep(2000)
from microbit import * This imports the full micro:bit Python Library
NOTICE the use of indents to scope code
while True: This statement is the start of a loop of indented code, true = always
display.scroll('Hello, World!') Python function to scroll text on the LEDs
display.show(Image.HEART) Python function image onto the LEDs
sleep(2000) waits 2 seconds before continuing