
sensors flowhcart g6
Authored by Fadi Fadi
Computers
6th - 10th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
19 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code do when Button A is pressed? python Copy code from microbit import * while True: if button_a.is_pressed(): display.show(Image.HEART)
Show a heart image on the screen until Button B is pressed.
Show a heart image while Button A is pressed.
Show a heart image for 2 seconds, then turn off.
Nothing, the code is missing something.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code do? python Copy code from microbit import * import music music.play(music.DADADADUM)
Plays a melody called "DADADADUM."
Displays the string "DADADADUM" on the screen.
Plays no sound because there's no loop.
Plays a random sound.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function clears the display after showing an image?
display.clear()
display.reset()
display.stop()
display.hide()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if both Button A and B are pressed simultaneously in the code below? python Copy code from microbit import * while True: if button_a.is_pressed() and button_b.is_pressed(): display.show(Image.HAPPY)
The Micro will display a sad face.
The Micro will display a happy face.
The Micro will show nothing.
The Micro will restart.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code do when Button B is pressed? python Copy code from microbit import * while True: if button_b.is_pressed(): display.show(Image.SAD) sleep(3000) display.clear()
Show a sad face for 1 second.
Show a sad face for 3 seconds, then clear the screen.
Continuously show a sad face.
Show a sad face for 3 seconds, then display a smile.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of accelerometer.was_gesture("shake")?
To detect if the Micro was tilted.
To detect if the Micro was turned upside down.
To detect if the Micro was shaken.
To detect if the Micro was rotated.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code do? python Copy code from microbit import * display.scroll("Hello!")
Show "Hello!" on the screen one letter at a time.
Show "Hello!" in a single flash on the screen.
Continuously flash "Hello!" on the screen.
Display "Hello!" for 3 seconds, then clear.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?