
Checkpoint 1 - Getting started with Python for micro:bit
Quiz by Jonathan Saurine
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
20 questions
Show answers
- Q1What will the following line of code do when it is run?
from microbit import *
import everything from the microbit libraryimport animations from the microbit libraryimport sounds from the microbit libraryimport images from the microbit library30s - Q2Which of the following is the correct syntax for displaying an image?
show(Image.NO)
show(image.NO)
display(image.STICKFIGURE)
display(Image.stickfigure)
30s - Q3Where is the error in the code below?The asterisk is missing from the first line so the library is not imported correctly.On line 3,
sleep(2000)
should be replaced withwait(2000)
.On lines 2 and 4, only display is needed, instead of display.show.On line 4, there is noANGRY
image in the microbit library.30s - Q4
What is the purpose of line 2 in the following code?
The microbit will display the image for 3000 seconds before running the following line of code.The microbit will hide the image for 3000 seconds before running the following line of code.The microbit will display the image for 3 seconds before running the following line of code.The microbit will hide the image for 3 seconds before running the following line of code.30s - Q5How could the code below be changed to make the heart beat faster?
sleep(500)from microbit import* display.show(Image.HEART_SMALL) sleep(500) display.show(Image.HEART) sleep(500) display.show(Image.HEART_SMALL) sleep(500) display.show(Image.HEART)
increase the sleep time to 1000
decrease the sleep time to 1000decrease the sleep time to 250increase the sleep time to 25030s - Q6Which of the following will display text moving horizontally across the display?
scroll(Hello, micro:bit!)
scroll('Hello, micro:bit!')
vertical('Hello, micro:bit!')
horizontal('Hello, micro:bit!')
30s - Q7What will the following code produce on the microbit display?
from microbit import* display.scroll('I') display.show(Image.HEART) sleep(1000) display.scroll('MUSIC!')
I ♥ music!
scrolling across the display.I ♥ MUSIC!
scrolling across the display.A scrollingI
, then♥
for 1 second, followed by the wordMUSIC
scrolling across the display.AnI
for 1 second, then♥
for 1 second, followed by theMUSIC
image.30s - Q8Which of the following lines of code will correctly display a string?
scroll(‘HEART')
show(‘YES')
show(Image.HEART)
scroll(Image.'YES')
30s - Q9How can we display the number
5
on the micro:bit LED display?display.show(5)
display.image(5)
display.show(Image.5)
display.scroll(5)
30s - Q10How long will the micro:bit wait in the following code?
from microbit import* sleep(1500)
15 seconds150 seconds1.5 seconds1500 seconds30s - Q11Which of the following lines of code will correctly display a built-in sad face image?
display.image(SAD)
display.show(Image.SAD)
display.show(sad)
display.scroll(SAD)
30s - Q12Which statement will clear the micro:bit display?
display.remove
display.clear
display.hide
display.off
30s - Q13What will the following code display?
from microbit import* display.show(Image.CONFUSED) sleep(2000) display.clear()
A clear screen the entire time.A happy face for 2 seconds.A scrollingCONFUSED
text.A confused face for 2 seconds.30s - Q14What does the
Image.ALL_CLOCKS
represent?A list of images representing all 60-minute clock positions.A list of all available images in the library.A list of images representing all 12-hour clock positions.A list of images of different types of clocks.30s - Q15What will the following code display on the microbit?
from microbit import* display.show(Image.CLOCK12) sleep(2000) display.show(Image.CLOCK3)
The image of a clock pointing at 12 indefinitely.The image of a clock pointing at 12 for 2 seconds, then the image of a clock pointing at 3.The image of a clock pointing at 12 for 2 milliseconds, then the image of a clock pointing at 3.Only the image of a clock pointing at 3.30s