When using the MicroPython editor you will need to manually save (download)
your Python script to use it later. To keep working on it you will need to
open (upload) the script again.
Navigate to the MicroPython editor https://python.microbit.org/v/3. If you
already have it open, then use that existing window or tab.
Question 1
Run the sample provided on the simulated micro:bit.
frommicrobitimport*# Code in a 'while True:' loop repeats foreverwhileTrue:display.show(Image.HEART)sleep(1000)display.scroll('Hello')
Solution
You should see a heart image on the LED array for 1 second, then the text “Hello” scrolls across the display. This repeats indefinitely.
Question 2
Stop the running program by clicking the stop button below the micro:bit.
Now show the serial monitor by clicking in the region shown below:
Update your code to include a print statement to show your name at the end of every loop i.e.
frommicrobitimport*# Code in a 'while True:' loop repeats foreverwhileTrue:display.show(Image.HEART)sleep(1000)display.scroll('Hello')print("YOUR NAME HERE")
Answer the following:
Describe what is shown in the serial monitor (or upload a screenshot)
Does your name appear immediately when running the code or after a short period? Why is that?