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
 | 
					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'. 
 | 
					## 2. Write the code that stores the compass heading into a local variable called 'degrees'. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<br/>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
let degrees = input.compassHeading()
 | 
					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 
 | 
					## 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) {
 | 
					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) {
 | 
					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) {
 | 
					if (degrees < 225) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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?
 | 
					## 1. What is the purpose of the 'compass heading' block?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<br/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## 2. Write the code that stores the compass heading into a local variable called 'degrees'. 
 | 
					## 2. Write the code that stores the compass heading into a local variable called 'degrees'. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<br/>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 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 North. Display 'N' on the micro:bit 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<br />
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 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 />
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 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 />
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,23 +22,25 @@ input.onPinPressed(TouchPin.P0, () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
## 3. What does this line of code doing?
 | 
					## 3. What does this line of code doing?
 | 
				
			||||||
 | 
					
 | 
				
			||||||

 | 
					```blocks
 | 
				
			||||||
 | 
					let x = Math.random(9)
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<br/>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
It stores random number between 0 and 9 then stores that number in a variable.
 | 
					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?
 | 
					## 4. Why do you have to add 1 to variable x?
 | 
				
			||||||
 | 
					
 | 
				
			||||||

 | 
					```blocks
 | 
				
			||||||
 | 
					let item = 0;
 | 
				
			||||||
<br/>
 | 
					item = 0;
 | 
				
			||||||
 | 
					basic.showNumber(item + 1);
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
You have to add 1 if you want to generate a random number between 1 and 10 .
 | 
					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?
 | 
					## 5. Why do you have to hold ground (GND) to make this work on the micro:bit?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<br/>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
You have told GND to complete the circuit.
 | 
					You have told GND to complete the circuit.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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?
 | 
					## 3. Describe what this line of code does?
 | 
				
			||||||
 | 
					
 | 
				
			||||||

 | 
					```blocks
 | 
				
			||||||
 | 
					let x = Math.random(9)
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 4. Describe what adding 1 to variable x does?
 | 
					## 4. Describe what adding 1 to variable x does?
 | 
				
			||||||
 | 
					
 | 
				
			||||||

 | 
					```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
 | 
					## 5. Describe why you must hold ground (GND) before pressing (P0) to run a program using `on pin pressed(P0)` on the micro:bit
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user