moved remaining quizzes

This commit is contained in:
Michael Elliot Braun
2016-03-29 15:21:17 -07:00
parent c6e2391bcd
commit 0e816f2398
8 changed files with 0 additions and 0 deletions

View File

@ -1,34 +0,0 @@
# digi yoyo quiz answers
Answers for digi yoyo quiz.
This is the answer key for the [digi yoyo quiz](/microbit/lessons/digi-yoyo/quiz).
## 1. Describe what a "while loop" does?
<br/>
A loop that repeats code while a condition is true.
## 2. Write the code that will create a **variable** called `count` and set the variable to 0.
![](/static/mb/lessons/counter-0.png)
<br/>
```
let count = 0
```
## 3. Create a `while loop` that will loop until the **variable** `count` equals 4.
![](/static/mb/lessons/digi-yoyo-0.png)
<br/>
```
while (count < 5) {
count = count + 1
}
```

View File

@ -1,28 +0,0 @@
# digi yoyo quiz
Create a counter with a while loop
## Name
## Directions
Use this activity document to guide your work in the [digi yoyo tutorial](/microbit/lessons/digi-yoyo/tutorial)
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/>

View File

@ -1,53 +0,0 @@
# glowing pendulum quiz answers
construct a pendulum that glows using acceleration #LED #number #math #acceleration #docs
## Name
## Directions
Use this activity document to guide your work in the [glowing pendulum tutorial](/microbit/lessons/glowing-pendulum/tutorial)
Answer the questions while completing the tutorial. Pay attention to the dialogues!
## 1. Why are you creating a 'forever' loop?
<br/>
We are creating a forever loop to constantly display the appropriate brightness on the LED display.
## 2. Write the line of code to measure the acceleration with respect to the "y" axis and store this value in a local variable called 'acceleration'.
<br/>
```
let acceleration = input.acceleration("y")
```
## 3. After storing the acceleration in a variable, write the code to take the absolute value of the acceleration, and store this value inside 'acceleration'.
<br/>
```
acceleration = math.abs(acceleration)
```
## 4. Write the code that uses the acceleration value from question #3 to set the brightness on the BBC micro:bit.
<br/>
```
acceleration = acceleration / 4
led.setBrightness(acceleration)
```
## 5. Write the code that tuns all the LEDs on (as the image displays below)
![](/static/mb/lessons/glowing-pendulum-1.png)
<br/>
```
led.plotAll()
```

View File

@ -1,34 +0,0 @@
# glowing pendulum quiz
construct a pendulum that glows using acceleration #LED #number #math #acceleration #docs
## Name
## Directions
Use this activity document to guide your work in the [glowing pendulum tutorial](/microbit/lessons/glowing-pendulum/tutorial)
Answer the questions while completing the tutorial. Pay attention to the dialogues!
## 1. Why are you creating a 'forever' loop?
<br/>
## 2. Write the line of code to measure the acceleration with respect to the "y" axis and store this value in a local variable called 'acceleration'.
<br/>
## 3. After storing the acceleration in a variable, write the code to take the absolute value of the acceleration, and store this value inside 'acceleration'.
<br/>
## 4. Write the code that uses the acceleration value from question #3 to set the brightness on the BBC micro:bit.
<br/>
## 5. Write the code that tuns all the LEDs on (as the image displays below)
![](/static/mb/lessons/glowing-pendulum-1.png)
<br/>

View File

@ -1,55 +0,0 @@
# rotation animation quiz answers
Learn how to create a rotating image with a while loop. #image #loop #while #docs
This is the answer key for the [rotation animation quiz](/microbit/lessons/rotation-animation/quiz).
## 1. What is a "global variable"?
Answers may vary. A global variable is a place where you can store data so that you can use it later in your code.
## 2. Consider the following directions
Write the code to create a **global variable** called `foo` that stores a boolean and initialize it to **false**.
```
rotating = true
```
## 3. Consider the following code
```
while (rotating) {
}
```
Explain what this line of code does.
<br/>
It is a **while** loop that will be executed only if the **global variable** called `rotating` is **true**.
## 4. Consider the following code
```
basic.showAnimation(`
# . . . . . . # . . . . . . # . . . . .
. # . . . . . # . . . . . # . . . . . .
. . # . . . . # . . . . # . . # # # # #
. . . # . . . # . . . # . . . . . . . .
. . . . # . . # . . # . . . . . . . . .
`, 400)
```
If the rectangle below represents the BBC micro:bit, shade the areas that will be displayed. Explain why that particular area is shaded.
![](/static/mb/lessons/rotation-animation-0.png)
![](/static/mb/lessons/rotation-animation-1.png)
![](/static/mb/lessons/rotation-animation-2.png)
![](/static/mb/lessons/rotation-animation-3.png)
Show animation will show a series of image frames on the LED screen, pausing the specified time (400 milliseconds) after each frame

View File

@ -1,45 +0,0 @@
# 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/>

View File

@ -1,35 +0,0 @@
# zoomer quiz answers
Measure the acceleration on the micro:bit in the "z" direction #LED #number #math #acceleration #docs
This is the answer key for the [zoomer quiz](/microbit/lessons/zoomer/quiz).
## 1. What is 'acceleration'?
Acceleration is amount of force being applied to the BBC micro:bit in one of three specified directions.
## 2. Consider the following directions
Write the line of code to measure the acceleration and then store in it a variable.
<br/>
```
let accX_ = input.acceleration("x")
```
Note: acceleration does not have be measured in the "x" direction. It can also be in the "y" or "z" direction.
## 3. Consider the following directions
After storing the acceleration in a variable, write the code to show acceleration on the BBC micro:bit as a number
<br/>
```
let accX = input.acceleration("x")
basic.showNumber(accX_, 150)
```
Note: make sure the same variable name ("acc x" in this case) is the same in both lines of code..

View File

@ -1,24 +0,0 @@
# zoomer quiz
Measure the acceleration on the micro:bit in the "z" direction #LED #number #math #acceleration #docs
## Name
## Directions
Use this activity document to guide your work in the [zoomer tutorial](/microbit/lessons/zoomer/tutorial)
Answer the questions while completing the tutorial. Pay attention to the dialogues!
## 1. What is 'acceleration'?
<br/>
## 2. Write the line of code to measure the acceleration and then store in it a variable.
<br/>
## 3. After storing the acceleration in a variable, write the code to show acceleration on the BBC micro:bit as a number.
<br/>