pxt-calliope/docs/lessons/magic-logo/quiz-answers.md
Peli de Halleux 50367217f3
Lessons fixes (#1609)
* fixing a bunch of lessons

* more fixes

* more fixes

* more cleanup

* Additional fixes
2018-11-09 15:36:46 -08:00

1.0 KiB

magic logo quiz answers

show an image that points up when the logo is up.

Name

Directions

This is the answer key for the magic logo quiz

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 @boardname@ screen is facing up and vertically orientated.


2. Write the condition that detects when the @boardname@ 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

input.onGesture(Gesture.LogoUp, function () {
})

3. Write the code to display a downward pointing arrow when the logo is down.


input.onGesture(Gesture.LogoDown, function () {
    basic.showLeds(`
. . # . .
. . # . .
# # # # #
. # # # .
. . # . .
`)
})