quiz updates
This commit is contained in:
@ -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
|
||||
|
||||
<br/>
|
||||
|
||||
## 2. Write the code that stores the compass heading into a local variable called 'degrees'.
|
||||
|
||||
<br/>
|
||||
|
||||
```
|
||||
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
|
||||
|
||||
<br />
|
||||
|
||||
```
|
||||
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
|
||||
|
||||
<br />
|
||||
|
||||
```
|
||||
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
|
||||
|
||||
<br />
|
||||
|
||||
```
|
||||
if (degrees < 225) {
|
||||
|
Reference in New Issue
Block a user