Migrate docs from the other repo

This commit is contained in:
Michal Moskal
2016-03-25 16:47:20 -07:00
parent 38d2cf06d2
commit a08eb53f92
895 changed files with 36888 additions and 0 deletions

View File

@ -0,0 +1,45 @@
# rotation animation quiz
Learn how to create a rotating image with a while loop. #image #loop #while #docs
## Name
## Directions
Use this activity document to guide your work in the [rotation animation tutorial](/microbit/lessons/rotation-animation/tutorial).
Answer the questions while completing the tutorial. Pay attention to the dialogues!
## 1. What is a "global variable"?
<br />
## 2. Write the code to create a global variable called foo that stores a boolean and initialize it to false.
<br/>
## 3. Explain why you use a while loop with a global variable
```
while (rotating) {
}
```
<br/>
## 4. Draw the areas on the micro:bits to illustrate the code below. Explain why you chose to draw in those areas.
```
basic.showAnimation(`
# . . . . . . # . . . . . . # . . . . .
. # . . . . . # . . . . . # . . . . . .
. . # . . . . # . . . . # . . # # # # #
. . . # . . . # . . . # . . . . . . . .
. . . . # . . # . . # . . . . . . . . .
`, 400)
```
![](/static/mb/lessons/looper-2.png)
<br/>