moving out outdated js docs
This commit is contained in:
45
olddocs/js/lessons/screen-wipe/quiz-answers.md
Normal file
45
olddocs/js/lessons/screen-wipe/quiz-answers.md
Normal file
@ -0,0 +1,45 @@
|
||||
# screen wipe quiz answers
|
||||
|
||||
clear the screen by pressing the "A" button after an animation has been played.
|
||||
|
||||
This is the answer key for the [screen wipe quiz](/lessons/screen-wipe/quiz).
|
||||
|
||||
## 1. What does the function "clear screen" do on the BBC micro:bit?
|
||||
|
||||
This function turns off all the LED lights on the LED screen.
|
||||
|
||||
## 2. Write the line of code that creates and displays this animation.
|
||||
|
||||

|
||||
|
||||
<br/>
|
||||
|
||||
```
|
||||
basic.showAnimation(`
|
||||
# # # # . # # # # # . . . . . . . . . .
|
||||
# # # # # # # # # # . . . . . . . . . .
|
||||
. . . . . # # # # # # # # # # . . . . .
|
||||
. . . . . # # # # # # # # # # # # # # #
|
||||
. . . . . . . . . . . . . . . # # # # #
|
||||
`, 400)
|
||||
```
|
||||
|
||||
## 3. Write the condition that will detect when the BBC micro:bit is shaken.
|
||||
|
||||
<br/>
|
||||
|
||||
```
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
})
|
||||
```
|
||||
|
||||
## 4. Write the code that will clear an animation from the screen after shaking the BBC micro:bit.
|
||||
|
||||
<br/>
|
||||
|
||||
```
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
basic.clearScreen()
|
||||
})
|
||||
```
|
||||
|
Reference in New Issue
Block a user