file management quizzes
This commit is contained in:
@ -1,40 +0,0 @@
|
||||
# looper quiz answers
|
||||
|
||||
Learn how to create a series of numbers with a for loop. #LED #screen #plot #docs
|
||||
|
||||
This is the answer key for the [looper quiz](/microbit/lessons/looper/quiz).
|
||||
|
||||
## 1. What is a for loop?
|
||||
|
||||
Answers will vary. In general, for loop refers to the code that repeats for a fixed number of times. We specify the LED using x, y coordinates.
|
||||
|
||||
## 2. Consider the following code
|
||||
|
||||
```
|
||||
for (let i = 0; i < 4; i++) {
|
||||
basic.showNumber(i, 150)
|
||||
}
|
||||
```
|
||||
|
||||
If the rectangle below represents the BBC micro:bit, shade the areas that will be displayed. Explain why that particular area is shaded.
|
||||
|
||||
Let's create a for loop where `0` is the loop's starting value, `i` is the index variable, and `4` is the ending value. The index variable `i` starts at 0 and increases by 1 each time through the loop. The loop ends when `i = 4`.
|
||||
|
||||

|
||||
|
||||
## 3. Consider the following code
|
||||
|
||||
```
|
||||
for (let i1 = 0; i1 < 6; i1++) {
|
||||
basic.showNumber(i1, 150)
|
||||
}
|
||||
```
|
||||
|
||||
If the rectangle below represents the BBC micro:bit, shade the areas that will be displayed. Explain why that particular area is shaded.
|
||||
|
||||
Let's create a for loop where `0` is the loop's starting value, `i` is the index variable, and `6` is the ending value. The index variable `i` starts at 0 and increases by 1 each time through the loop. The loop ends when `i = 6`.
|
||||
|
||||

|
||||
|
||||

|
||||
|
@ -1,42 +0,0 @@
|
||||
# looper quiz
|
||||
|
||||
Learn how to create a series of numbers with a for loop. #LED #screen #plot #docs
|
||||
|
||||
## Name
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [looper tutorial](/microbit/lessons/looper/tutorial)
|
||||
|
||||
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.
|
||||
|
||||
```
|
||||
for (let i = 0; i < 4; i++) {
|
||||
basic.showNumber(i, 150)
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
<br/>
|
||||
|
||||
## 3. Draw the areas where the LEDs will be lit based on the code below. Explain why you chose to draw those numbers.
|
||||
|
||||
```
|
||||
for (let i1 = 0; i1 < 6; i1++) {
|
||||
basic.showNumber(i1, 150)
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
<br/>
|
||||
|
Reference in New Issue
Block a user