From blocks to Python 🐍

Block coding is the perfect on-ramp, but eventually children want to type real code. When they're ready, we move to MicroPython using the official micro:bit Python Editor - it even shows the block version of your code side by side, so nothing feels like starting over.

A first taste - this will run on a micro:bit and show a beating heart ❤️

from microbit import *

while True:
    display.show(Image.HEART)
    sleep(500)
    display.show(Image.HEART_SMALL)   # a tiny heart!
    sleep(500)
    

Try it! Copy and Paste into the official Python Editor and see the results.

How we bridge the gap

  • Same projects, rebuilt in Python - familiar goals, new syntax
  • Pair programming: one types, one navigates, then swap
  • "Blocks → code" view in the editor as training wheels
  • Small wins first: scrolling text, then buttons, then games

Why Python?

  • The most-taught language in UK schools and beyond
  • Free forever, runs everywhere
  • A skill that lasts: data science, games, robotics, AI