Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1IF acceleration > 8 THEN SWING_SWORD | AIF head_turn = LEFT THEN VIEW ← LEFT | |
| 2IF hit = TRUE THEN VIBRATE(1) | Bpos ← READ_IR() MOVE_AVATAR(pos) | |
| 3A VR headset responds to head movement by changing the view the player sees | CThe headset sensor must not control the screen directly. Its reading goes to the microprocessor, which processes it and then changes the view. | |
| 4An infra-red sensor tracks where the player is so the game can move their on-screen character | DA vibration motor is an actuator (an output device), so the microprocessor cannot read from it like a sensor. It should switch it on with something like VIBRATE(1). | |
| 5pressure ← READ(vibration_motor) | EWhen the game detects a hit, the microprocessor switches on the vibration motor so the player feels it | |
| 6SCREEN ← head_sensor | FA fast movement of the motion controller makes the character swing a sword in the game |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
gaming automated system — Sensors in a controller or headset send readings to a microprocessor, which changes what the player sees or feels, such as moving the view or making the controller vibrate.shake ← READ(accelerometer)
IF shake > 8 THEN
OUTPUT "Sword swing"dist ← READ(proximity)
IF dist < 1 THEN
OUTPUT "Move back"IF hit = TRUE THEN
SET motor ← ON
ENDIFIF head = "left" THEN
view ← "turn left"
ENDIFplayer ← READ(infrared)
IF player = "left" THEN
OUTPUT "Move view left"