file management quizzes

This commit is contained in:
Michael Elliot Braun
2016-03-29 15:14:16 -07:00
parent d9c51b5fd5
commit 00adabe441
20 changed files with 0 additions and 0 deletions

View File

@ -1,39 +0,0 @@
# guess the number quiz answers
Learn how to generate a random number on the micro:bit. #math #random #docs
This is the answer key for the [guess the number quiz](/microbit/lessons/guess-the-number/quiz).
## 1. What is on button pressed?
Answers may vary. Generally, on button pressed run code when an input button is pressed. The micro:bit has two input buttons: A and B.
## 2. Consider the following directions
Write the line of code that creates a condition when the BBC micro:bit button A is pressed.
```
input.onButtonPressed("A", () => {
})
```
## 3. Consider the following directions
Write the line of code that creates a **local variable** and a **random number**.
```
let randomNumber = Math.random(10)
```
## 4. Consider the following code
```
randomNumber = Math.random(10)
```
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/guess-the-number-0.png)
The random number generator will return a number from 0 to the limit. However, not including the limit unless the limit is 0. So you can place an X to represent any single digit number.

View File

@ -1,35 +0,0 @@
# guess the number quiz
Learn how to generate a random number on the micro:bit. #math #random #docs
## Name
## Directions
Use this activity document to guide your work in the [guess the number tutorial](/microbit/lessons/guess-the-number/tutorial).
Answer the questions while completing the tutorial. Pay attention to the dialogues!
## 1. Describe what "input -> on button pressed" does?
<br />
## 2. Write the line of code that creates a condition for on button A pressed.
<br />
## 3. Write the line of code that creates a `local variable` called `randomNumber` and will return a number from 0 to a limit of 10.
<br />
## 4. Draw the area that could be lit based on the code below. Explain why you chose to draw that number.
```
let randomNumber = Math.random(10)
basic.showNumber(randomNumber, 150)
```
![](/static/mb/empty-microbit.png)
<br />