pxt-calliope/docs/lessons/looper/quiz.md

43 lines
849 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# looper quiz
2016-04-02 01:22:47 +02:00
Learn how to create a series of numbers with a for loop.
2016-03-26 00:47:20 +01:00
## Name
## Directions
2016-04-13 17:27:45 +02:00
Use this activity document to guide your work in the [looper tutorial](/lessons/looper/activity)
2016-03-26 00:47:20 +01:00
Answer the questions while completing the tutorial. Pay attention to the dialogues!
## 1. Describe what a "for loop" does?
<br/>
## 2. Draw the areas where the LEDs will be lit based on the code below. Explain why you chose to draw those numbers.
2016-03-30 22:41:01 +02:00
```blocks
2016-03-26 00:47:20 +01:00
for (let i = 0; i < 4; i++) {
basic.showNumber(i, 150)
}
```
![](/static/mb/lessons/looper-2.png)
<br/>
## 3. Draw the areas where the LEDs will be lit based on the code below. Explain why you chose to draw those numbers.
2016-03-30 22:41:01 +02:00
```blocks
2016-03-26 00:47:20 +01:00
for (let i1 = 0; i1 < 6; i1++) {
basic.showNumber(i1, 150)
}
```
![](/static/mb/lessons/looper-3.png)
![](/static/mb/lessons/looper-3.png)
<br/>