57 lines
1013 B
Markdown
Raw Normal View History

2016-03-25 16:47:20 -07:00
# magic logo quiz answers
2016-04-01 16:22:47 -07:00
show an image that points up when the logo is up.
2016-03-25 16:47:20 -07:00
## Name
## Directions
2016-04-13 08:27:45 -07:00
This is the answer key for the [magic logo quiz](/lessons/magic-logo/quiz)
2016-03-25 16:47:20 -07:00
Answer the questions while completing the tutorial. Pay attention to the dialogues!
## 1. Define 'on logo up'
A function that will run code when the BBC micro:bit screen is facing up and vertically orientated.
<br/>
2016-03-30 13:41:01 -07:00
## 2. Write the condition that detects when the BBC micro:bit logo is facing up and vertically orientated.
The `logo up` event is raised when...
* the screen is facing up and the board is horizontal
* the screen is facing down and the board is horizontal
* the board is vertical and the logo is facing up
2016-03-25 16:47:20 -07:00
<br/>
2016-03-30 13:41:01 -07:00
```blocks
2016-03-25 16:47:20 -07:00
input.onLogoUp(() => {
})
```
<br/>
2016-03-30 13:41:01 -07:00
## 3. Write the code to display a downward pointing arrow when the logo is down.
2016-03-25 16:47:20 -07:00
![](/static/mb/lessons/magic-logo-0.png)
2016-03-30 13:41:01 -07:00
2016-03-25 16:47:20 -07:00
<br/>
2016-03-30 13:41:01 -07:00
```blocks
2016-03-25 16:47:20 -07:00
input.onLogoDown(() => {
2016-03-30 15:11:05 -07:00
basic.showLeds(`
2016-03-25 16:47:20 -07:00
. . # . .
. . # . .
# # # # #
. # # # .
. . # . .
`)
})
```