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.
NOT found evaluate to when found is true?Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1if x > 0 AND x < 100 then print "In range" end if | Aif NOT found then print "Not found" end if | |
| 2if isStudent OR isSenior then print "Discount" end if | BWrong — || is not valid VCAA pseudocode. The correct boolean operator is the word OR written in uppercase: `if a < 0 OR a > 100 then` | |
| 3AND is true only when BOTH of its conditions are true; if either is false the whole AND expression is false | Cif age >= 18 AND hasID then print "Entry allowed" end if | |
| 4NOT reverses the truth value of the condition that follows it: NOT true becomes false, and NOT false becomes true | DUses AND to combine two conditions — the then branch executes only when x is greater than 0 AND less than 100 at the same time | |
| 5if x > 0 && x < 10 then | EWrong — && is not valid VCAA pseudocode. The correct boolean operator is the word AND written in uppercase: `if x > 0 AND x < 10 then` | |
| 6if a < 0 || a > 100 then | FUses OR to combine two conditions — the then branch executes when either isStudent is true OR isSenior is true, or both |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
AND — A VCAA pseudocode boolean operator that combines two conditions. The overall result is true only when BOTH conditions are true. Example: x > 0 AND x < 10if x > 0 AND x < 10 thenif a < 0 OR a > 100 thenif NOT found then
print "Not found"
end ifif age >= 18 AND hasID thenif isStudent OR isSenior then