updated quizzes
This commit is contained in:
@ -12,8 +12,9 @@ Answers may vary. Generally, on button pressed run code when an input button is
|
||||
|
||||
Write the line of code that creates a condition when the BBC micro:bit button A is pressed.
|
||||
|
||||
```
|
||||
input.onButtonPressed("A", () => {
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
@ -21,13 +22,13 @@ input.onButtonPressed("A", () => {
|
||||
|
||||
Write the line of code that creates a **local variable** and a **random number**.
|
||||
|
||||
```
|
||||
```blocks
|
||||
let randomNumber = Math.random(10)
|
||||
```
|
||||
|
||||
## 4. Consider the following code
|
||||
|
||||
```
|
||||
```blocks
|
||||
randomNumber = Math.random(10)
|
||||
```
|
||||
|
||||
|
@ -24,7 +24,7 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
## 4. Draw the area that could be lit based on the code below. Explain why you chose to draw that number.
|
||||
|
||||
```
|
||||
```blocks
|
||||
let randomNumber = Math.random(10)
|
||||
basic.showNumber(randomNumber, 150)
|
||||
```
|
||||
|
Reference in New Issue
Block a user