What will we see on the Micro:bit display when the following code is run?

from microbit import * def heart_wait(): display.show(Image.HEART) sleep(1000) heart_wait() display.clear() display.show(Image.HEART) sleep(1000) display.show(Image.HAPPY) sleep(1000) display. Clear()

We will see a heart displayed on the Micro:bit for one second, then it will be cleared. After that, a heart will be displayed again for one second, followed by a happy face for one second, and then the display will be cleared.

display.show(Image('00009;' '00999;' '00900;' '99900;' '90000'))

display. Show(Image('00009;' '00999;' '00900;' '99900;' '90000'))

display. Show(Image('90000;' '99900;' '00900;' '00999;' '00009'))
display.show(Image('90000;' '99900;' '00900;' '00999;' '00009'))

display.show(Image('09999;' '00099;' '99099;' '99000;' '99990'))
display. Show(Image('09999;' '00099;' '99099;' '99000;' '99990'))

display. Show(Image('9000;' '09900;' '00000;' '00990;' '00009'))

The code you posted will display a series of images on the Micro:bit display. Here is what each image represents:

1. Image of a love heart
2. Same as the first image - love heart
3. Inverted love heart
4. Same as the third image - inverted love heart
5. A criss-cross pattern like # has of digit 9 in all corners
6. (Typo - Change display. Show() to display.show()) A criss-cross pattern like # has of digit 9 in all corners
7. A diagonal pattern like / has of digit 9 in diagnol cross
8. A criss-cross pattern in diagnol 9;display.show(Image('9000;' '09900;' '00000;' '00990;' '00009'))

Each image will be displayed on the Micro:bit screen and then cleared.

What will we see on the Micro:bit display when this code segment is run?

while True: display. Show('A') sleep(1000) display.show('B') sleep(1000)

When running this code segment, the Micro:bit display will continuously switch between displaying the letter 'A' for 1 second and the letter 'B' for 1 second in an infinite loop. The display will alternate between showing 'A' and 'B' every second.

How many times will we see the number 5 when this code segment is run? for i in range (4): display. Scroll(5)

When this code segment is run with the for loop ranging from 0 to 3 (`range(4)`), the number 5 will be displayed and scrolled four times. Each iteration of the loop will display number 5 and then scroll it on the Micro:bit display.

Which code segment will scroll "yes no yes no yes no" across the display?

for i in range (3): display.scroll('yes') display. Scroll('no')
for i in range (3): display.scroll('yes') for i in range (3): display. Scroll('no')
for i in range (3): display.scroll('yes') display.scroll('no') display. Scroll('yes')
for i in range (3): display.scroll('yes') display. Scroll('no')

The correct code segment that will scroll "yes no yes no yes no" across the display is:

```
for i in range(3):
display.scroll('yes')
display.scroll('no')
```

In this code segment, each iteration of the loop scrolls "yes" followed by "no", repeatedly for three times.

for i in range(3):

display.scroll('yes')
display. Scroll('no')

There was a small typo in your code snippet. Here is the corrected code segment that will scroll "yes no yes no yes no" across the display:

```python
for i in range(3):
display.scroll('yes')
display.scroll('no')
```

In this code segment, "yes" will be scrolled on the display, followed by "no", and this pattern will repeat three times. This will result in "yes no yes no yes no" scrolling across the display.

List the four debugging tips mentioned in the lesson.

The four debugging tips mentioned in the lesson are:

1. **Understand the Code**: Make sure you understand what the code should be doing before trying to fix any issues.

2. **Use Print Statements**: Insert print statements at various points in the code to see the values of variables and to track the program flow.

3. **Check Syntax**: Look for syntax errors such as missing colons, parentheses, or quotation marks.

4. **Comment out Code**: Temporarily comment out sections of code to isolate where the issue might be occurring. This can help in pinpointing the problematic part of the code.