2016-03-26 00:47:20 +01:00
|
|
|
# love meter blocks quiz
|
|
|
|
|
|
|
|
Learn how to make a love meter that you can try with someone.
|
|
|
|
|
|
|
|
## Name
|
|
|
|
|
|
|
|
## Directions
|
|
|
|
|
2016-04-13 17:27:45 +02:00
|
|
|
Use this activity document to guide your work in the [love meter activity](/lessons/love-meter/activity).
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
Answer the questions below while completing the activity. Pay attention to the dialogues!
|
|
|
|
|
|
|
|
## 1. Describe what `on pin pressed` does?
|
|
|
|
|
|
|
|
|
|
|
|
## 2. Create a condition for on pin pressed (P0).
|
|
|
|
|
|
|
|
|
|
|
|
## 3. Describe what this line of code does?
|
|
|
|
|
2016-03-29 22:13:18 +02:00
|
|
|
```blocks
|
2018-06-01 20:42:38 +02:00
|
|
|
let x = Math.randomRange(0, 9)
|
2016-03-29 22:13:18 +02:00
|
|
|
```
|
2016-03-26 00:47:20 +01:00
|
|
|
|
2016-03-29 20:57:50 +02:00
|
|
|
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
## 4. Describe what adding 1 to variable x does?
|
|
|
|
|
2016-03-29 22:13:18 +02:00
|
|
|
```blocks
|
|
|
|
let item = 0;
|
|
|
|
item = 0;
|
|
|
|
basic.showNumber(item + 1);
|
|
|
|
```
|
|
|
|
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
|
2016-11-02 01:44:37 +01:00
|
|
|
## 5. Describe why you must hold ground (GND) before pressing (P0) to run a program using `on pin pressed(P0)` on the @boardname@
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
|