Skip to content

Python name badge

Lesson 1 of 6

Python

9-12 yrs, 11-14 yrs

Learn what Python is, explore the Python Editor, and make a name badge.

Key learning:

  • I can explain what Python is and why it’s useful to learn to code in Python.
  • I can find my way around the Python Editor using its features that support creativity and debugging.
  • I can give the micro:bit instructions in text-based code to make a name badge using the LED display output.

Computational thinking:

Algorithms

Computer systems:

Input/output

Programming:

Iteration

Text-based programming

Lesson plan preview

Slides preview

Student handouts

Completed lesson code

This provides an example of the code created during this lesson.

1# Imports go at the top
2from microbit import *
3
4
5# Code in a 'while True:' loop repeats forever
6while True:
7    display.show(Image.BUTTERFLY)
8    sleep(1000)
9    display.scroll('Amari')
10

You may also be interested in

Introduces our Python Editor that helps learners to write code for the BBC micro:bit. We will highlight all the great features in our editor that support you and your learners to code the micro:bit successfully using Python.

A sequence of lessons that provide a pathway through six projects, ideal for getting started with the micro:bit. Students develop their use of some core computing concepts by coding and making practical projects including step counters, nightlights, and games.

Seven lessons introducing AI in general and unpacking what students already know about sorting data, before getting hands-on, creating, testing and improving their own machine learning models to be used as new inputs in code on the micro:bit.