The new micro:bit Python Editor
The new micro:bit Python Editor is designed to help students who are learning to code using a text-based language. Python is a great way to deepen your programming skills through text-based coding. The online simulator makes coding lessons more productive and teachers can manage whole class coding lessons in minutes by distributing code to your class. Our Python editor is designed to help teachers and learners get the most out of text-based programming on the micro:bit.
Model and test code quickly
The new editor's simulator allows you to model coding tasks to your students using a virtual micro:bit. Students can also use this to test, debug and iterate their program designs before putting their code on a real micro:bit.
Learn and discover programming concepts
The Reference section allows your students to learn programming concepts through short explanations and code snippets they can drag and drop straight into their projects. They can build their understanding by modifying code snippets to fit their own project ideas.
Why learn Python on the micro:bit?
Python is an excellent first text-based language to learn. Its instructions and syntax are based on natural language, making code easy to read, understand and modify.
As well as being widely used in education, it's used in industry, especially in the areas of data science and machine learning. Python is not just used by software developers, but also by people working in fields as diverse as medicine, physics and finance.
Python on the BBC micro:bit brings the benefits of physical computing to students aged 11-14, learning programming fundamentals through text-based coding: immersive, creative experiences for students that help build engagement and knowledge.
Features of the new Micro:bit Python Editor
Click on the headings below to discover some key features of the micro:bit Python Editor designed to overcome some common barriers, boost creativity and make the most of your coding time in class:
1. Reference
The Reference section makes it easy to discover what Python and the micro:bit can do, like browsing blocks in MakeCode or Scratch.
Easily discovering the potential of the micro:bit hardware and writing software in Python boosts your students' creativity.
2. Drag and drop code snippets
Easily discover examples to drag and drop into code.
Students can drag working examples of code straight into the editor and test them out straight away. This saves time and helps overcome barriers caused by lack of keyboard skills and the need to remember precise syntax.
3. Code structure highlighting
Intuitively learn correct structure and resolve errors.
Blocks of colour show the structure of your students' Python programs, which helps with the design, planning and testing phases of their project. It's easier to understand the flow of a program when you can easily see which lines of code belong in a loop or 'if... then' statement, for example.
We know students new to Python can find indentations confusing, so clear lines help with debugging, making it easy to spot if code is not correctly aligned.
4. Error highlighting
Errors are a normal part of coding. Symbols by the line number help you and your students identify bugs and fix them before sending code to a micro:bit. You can hover over the circle in the margin to see an explanation of the error.
5. Auto-complete
Discover features, correct syntax, and speed up typing with auto-complete suggestions.
Fear of a blank screen and not knowing what to type are two of the biggest barriers to starting text-based coding.
So, as you type, the editor makes suggestions which you can pick by clicking or pressing the enter key. This saves time, saves typing errors and saves students having to remember precise syntax.
It's also another way of discovering what Python and the micro:bit can do, for example by seeing more options for built-in images.
6. Simulator
Including simulating buttons, gestures, light levels, temperature, compass, sound, radio, serial pins and data logging.
Students can test their code out using the simulator before sending it to a real micro:bit.
This helps them develop, test, debug and evaluate their code and means they can work on projects even when they don't have access to a micro:bit device.
7. Ideas
The Ideas tab has complete working micro:bit projects you can show to your students. Each project has suggestions for customising and improving the code, so you can use these as starting points for coding lessons.
ThDon't forget to explore the Ideas tab which contains complete working programs your students can use straight away, then modify to make their own. You'll find an emotion badge, step counter, radio, and sound projects.