3. Show Text Quiz
3.1. Question 1
What is the default delay time between characters when using the display.show() function without specifying a custom delay?
Incorrect. 150ms is the default delay for the text scrolling function, not the show function.
Incorrect. 200ms is a custom short delay option mentioned in the tasks.
Correct. The documentation specifies that each character or digit is shown with a default of 400ms between them.
Incorrect. 500ms is used for pauses or custom slower displays.
3.2. Question 2
What happens to the micro:bit LED display after executing a basic display.show(3.14) statement without any additional clearing commands?
Incorrect. The function does not clear itself automatically by default.
Incorrect. Flashing requires a loop with explicit clear and sleep states.
Correct. After using display.show, the last digit or character is left displayed on the screen.
Incorrect. Hardware resets do not occur from a standard display call.
3.3. Question 3
Which function should be called to completely wipe or remove the last left-over character from the micro:bit screen?
Incorrect. There is no reset function in the display module for this purpose.
Correct. The display.clear() function is explicitly used to remove the last character from the display.
Incorrect. Sleep is a global function used to pause program execution time, not clear the screen.
Incorrect. Passing None is invalid syntax for removing text characters.
3.4. Question 4
What is the primary difference between the behavior of these two code examples?
Example A:
display.show(3.14)
Example B:
while True:
display.show(3.14)
display.clear()
sleep(2000)
Incorrect. It is the opposite; Example B contains an infinite loop block.
Correct. Example A leaves the final character up, whereas Example B deliberately blanks the display periodically.
Incorrect. Sleep is completely valid and keeps the screen blank for a short time.
Incorrect. Both use the default character delay speed.
3.5. Question 5
If a developer sets the parameter clear=True inside display.show('Hi', clear=True), what action is performed automatically?
Incorrect. It does not stop execution of the script.
Incorrect. Character order remains sequentially normal.
Correct. If clear is True, the display will be cleared after it has finished showing the sequence.
Incorrect. The character-to-character delay parameter is independent of clearing.
3.6. Question 6
Which of the following lines correctly sets a custom delay of 150ms between sequence characters using keyword arguments?
Correct. This properly specifies the value and uses the named parameter syntax.
Incorrect. Appending ‘ms’ to a number is invalid syntax in Python.
Incorrect. The sequence value to display is entirely missing from this function call.
Incorrect. This attempts to perform an invalid addition between a string and an integer.
3.7. Question 7
Look closely at the following code structure:
from microbit import *
while True:
display.show('I like the ', delay=200)
display.show('NBA', delay=400)
display.clear()
sleep(2000)
What is the core design purpose of modifying the delay parameters in this specific way?
Incorrect. Adjusting screen delays does not materially alter device power modes.
Correct. Varying speeds allows secondary structural text to pass quickly and core content slowly.
Incorrect. The show function sequences elements statically one character at a time; it does not scroll.
Incorrect. A while True condition loops indefinitely regardless of internal delays.
3.8. Question 8
What data types can be successfully passed as the first argument into the display.show() function sequence?
Incorrect. It can process numerical digits directly too.
Incorrect. Strings and decimals can be shown just as easily.
Correct. The function sequentially displays letters or digits from strings, floating-point decimals, or whole integers.
Incorrect. These are not supported data sequences for standard sequential text display.
3.9. Question 9
A student wants to display the word “ABC” such that the final character ‘C’ is removed right away, followed by a brief half-second pause. Which option is correct?
Incorrect. This does not use clear parameters or clear commands, leaving ‘C’ stuck on screen.
Correct. It automatically removes the last character via clear=True and pauses for 500ms (half a second).
Incorrect. This explicitly stops the character from being cleared, and pauses for only 50ms.
Incorrect. This merely slows the timing between characters to 500ms instead of creating a final blank screen pause.
3.10. Question 10
Why are variables useful when passing statistics (like player names or scores) to a series of display.show() instructions?
Incorrect. Raw values can easily be passed directly to the function parameters.
Correct. Isolating variables keeps the core display loop clean and easy to modify.
Incorrect. Variables hold data but do not change the core behavior of the show function.
Incorrect. Variables occupy space in execution memory and do not perform cleanup tasks.