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 answer = correct THEN score ← score + 1 | AThe branch resets the score instead of choosing an easier question. It should pick an easier question when wrongInRow is 2. | |
| 2IF wrongInRow = 2 THEN use easier question | Bscore ← 0 | |
| 3The quiz repeats the question steps until 5 questions have been asked | CIf the answer is right, add 1 to the score variable | |
| 4The quiz starts with a score variable set to 0 before any questions are asked | DREPEAT UNTIL questionsAsked = 5 | |
| 5IF answer = correct THEN score ← 1 | EThis sets score to 1 instead of adding 1. The score will never go above 1. It should be score ← score + 1. | |
| 6IF wrongInRow = 2 THEN score ← 0 | FAfter two wrong answers in a row, switch to an easier question |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
quiz algorithm — An algorithm that repeats questions, adds 1 to a score variable for each right answer, and picks harder or easier questions depending on that score.SET score ← 0
REPEAT 5 TIMES
ASK a maths questionIF answer = correct THEN
SET score ← score + 1
END IFIF answer = correct THEN
SET score ← score + 1
END IFIF wrong = 2 THEN
ASK an easier question
END IFIF score >= 4 THEN
ASK a harder question
END IF