pxt-calliope/docs/reference/js/lessons/love-meter/quiz.md

42 lines
806 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# love meter quiz
Learn how to make a love meter that you can try with someone. #LED #screen #variables #docs
## Name
## Directions
Use this activity document to guide your work in the [love meter tutorial](/microbit/lessons/love-meter/tutorial).
Answer the questions below while completing the tutorial. Pay attention to the dialogues!
## 1. Describe what "input -> on pin pressed (P0)" does?
<br/>
## 2. Create a condition for on pin pressed ("P1").
<br/>
## 3. Describe what this line of code does?
```
let x = Math.random(10)
```
<br/>
## 4. Describe what adding 1 to variable x does?
```
let x_ = Math.random(10)
x = x + 1
```
<br/>
## 5. Describe why you must hold ground (GND) before pressing (P0) to run a program using "input -> on pin pressed (P0)" on the BBC micro:bit
<br/>