diff --git a/docs/lessons/compass/quiz-answers.md b/docs/lessons/compass/quiz-answers.md index e7afef16..488f005f 100644 --- a/docs/lessons/compass/quiz-answers.md +++ b/docs/lessons/compass/quiz-answers.md @@ -14,11 +14,9 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu Gets the compass heading of the micro:bit in degrees -
## 2. Write the code that stores the compass heading into a local variable called 'degrees'. -
``` let degrees = input.compassHeading() @@ -26,7 +24,6 @@ let degrees = input.compassHeading() ## 3. Write the 'If statement' that will check if the device is mostly pointing North. Display 'N' on the micro:bit -
``` if (degrees < 45) { @@ -34,9 +31,8 @@ if (degrees < 45) { } ``` -## 3. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the micro:bit +## 4. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the micro:bit -
``` if (degrees < 135) { @@ -44,9 +40,8 @@ if (degrees < 135) { } ``` -## 3. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the micro:bit +## 5. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the micro:bit -
``` if (degrees < 225) { diff --git a/docs/lessons/compass/quiz.md b/docs/lessons/compass/quiz.md index 8217cdab..47452e6d 100644 --- a/docs/lessons/compass/quiz.md +++ b/docs/lessons/compass/quiz.md @@ -12,21 +12,15 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu ## 1. What is the purpose of the 'compass heading' block? -
- ## 2. Write the code that stores the compass heading into a local variable called 'degrees'. -
## 3. Write the 'If statement' that will check if the device is mostly pointing North. Display 'N' on the micro:bit -
-## 3. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the micro:bit +## 4. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the micro:bit -
-## 3. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the micro:bit +## 5. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the micro:bit -
diff --git a/docs/lessons/love-meter/quiz-answers.md b/docs/lessons/love-meter/quiz-answers.md index 9e2ee85a..4c95d526 100644 --- a/docs/lessons/love-meter/quiz-answers.md +++ b/docs/lessons/love-meter/quiz-answers.md @@ -22,23 +22,25 @@ input.onPinPressed(TouchPin.P0, () => { ## 3. What does this line of code doing? -![](/static/mb/blocks/lessons/love-meter-6.png) +```blocks +let x = Math.random(9) +``` -
It stores random number between 0 and 9 then stores that number in a variable. ## 4. Why do you have to add 1 to variable x? -![](/static/mb/blocks/lessons/love-meter-7.png) - -
+```blocks +let item = 0; +item = 0; +basic.showNumber(item + 1); +``` You have to add 1 if you want to generate a random number between 1 and 10 . ## 5. Why do you have to hold ground (GND) to make this work on the micro:bit? -
You have told GND to complete the circuit. diff --git a/docs/lessons/love-meter/quiz.md b/docs/lessons/love-meter/quiz.md index 7e6af5d9..b197570b 100644 --- a/docs/lessons/love-meter/quiz.md +++ b/docs/lessons/love-meter/quiz.md @@ -18,13 +18,20 @@ Answer the questions below while completing the activity. Pay attention to the d ## 3. Describe what this line of code does? -![](/static/mb/blocks/lessons/love-meter-6.png) +```blocks +let x = Math.random(9) +``` ## 4. Describe what adding 1 to variable x does? -![](/static/mb/blocks/lessons/love-meter-7.png) +```blocks +let item = 0; +item = 0; +basic.showNumber(item + 1); +``` + ## 5. Describe why you must hold ground (GND) before pressing (P0) to run a program using `on pin pressed(P0)` on the micro:bit