pxt-calliope/docs/reference/js/lessons/glowing-sword/quiz-answers.md

49 lines
856 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# glowing sword quiz answers
2016-04-02 01:22:47 +02:00
The answers for the glowing sword quiz.
2016-03-26 00:47:20 +01:00
2016-04-13 17:27:45 +02:00
This is the answer key for the [glowing sword quiz](/lessons/glowing-sword/quiz).
2016-03-26 00:47:20 +01:00
## 1. What is "fade out" ?
Fade out is a method that gradually decreases the LED screen brightness until the LED lights are turned off.
## 2. Consider the following code
```
basic.plotImage(`
. . . . #
# . . # .
. # # . .
. # # . .
# . . # .
`)
led.fadeOut(700)
```
Rewrite the second line of code to decrease the speed of the fade out for the longest amount of time (Hint: 1000 milliseconds is longest amount of time for a fade out).
<br/>
led->fade out(1000)
## 4. Consider the following code
```
basic.plotImage(`
. . . . #
# . . # .
. # # . .
. # # . .
# . . # .
`)
led.fadeOut(1000)
```
What will cause the image to fade back in twice as fast as it faded out?
<br/>
led->fade in(500)