2016-03-26 00:47:20 +01:00
|
|
|
# bounce image quiz answers
|
|
|
|
|
2016-04-02 01:22:47 +02:00
|
|
|
scroll an image on the BBC micro:bit.
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
This is the answer key for the [bounce image quiz](/microbit/lessons/bounce-image/quiz).
|
|
|
|
|
|
|
|
## 1. What does it mean to 'add frames' ?
|
|
|
|
|
|
|
|
Adding frames modifies the animation by including more still images in each animation.
|
|
|
|
|
|
|
|
## 2. Write the code that will display this animation.
|
|
|
|
|
|
|
|
![](/static/mb/lessons/bounce-image-0.png)
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
```
|
|
|
|
basic.showAnimation(`
|
|
|
|
# . . . .
|
|
|
|
# . . . .
|
|
|
|
# . . . .
|
|
|
|
# . . . .
|
|
|
|
# . . . .
|
|
|
|
`, 400)
|
|
|
|
```
|
|
|
|
|
|
|
|
## 3. Write the code that will display this animation with two frames.
|
|
|
|
|
|
|
|
![](/static/mb/lessons/bounce-image-1.png)
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
```
|
|
|
|
basic.showAnimation(`
|
|
|
|
# . . . . . # . . .
|
|
|
|
# . . . . . # . . .
|
|
|
|
# . . . . . # . . .
|
|
|
|
# . . . . . # . . .
|
|
|
|
# . . . . . # . . .
|
|
|
|
`, 400)
|
|
|
|
```
|
|
|
|
|
|
|
|
## 4. Write the code that will display this animation with three frames.
|
|
|
|
|
|
|
|
![](/static/mb/lessons/bounce-image-2.png)
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
```
|
|
|
|
basic.showAnimation(`
|
|
|
|
# . . . . . # . . . . . # . .
|
|
|
|
# . . . . . # . . . . . # . .
|
|
|
|
# . . . . . # . . . . . # . .
|
|
|
|
# . . . . . # . . . . . # . .
|
|
|
|
# . . . . . # . . . . . # . .
|
|
|
|
`, 400)
|
|
|
|
```
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|