2016-03-26 00:47:20 +01:00
|
|
|
# digi yoyo quiz
|
|
|
|
|
|
|
|
Create a counter with a while loop
|
|
|
|
|
|
|
|
## Name
|
|
|
|
|
|
|
|
## Directions
|
|
|
|
|
2016-03-31 01:10:27 +02:00
|
|
|
Use this activity document to guide your work in the [digi yoyo tutorial](/microbit/lessons/digi-yoyo/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 "while loop" does?
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
## 2. Write the code that will create a variable called count and set the variable to 0.
|
|
|
|
|
|
|
|
![](/static/mb/lessons/counter-0.png)
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
## 3. Write the code for a while loop that will loop until the variable count equals 4.
|
|
|
|
|
|
|
|
![](/static/mb/lessons/digi-yoyo-0.png)
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|