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 | |
|---|---|---|
| 1DECLARE StudentName : STRING | AThe shoe colour is an irrelevant detail. A timetable needs only the lessons, times and rooms, so abstraction means leaving it out. | |
| 2// Ignore the trees and houses | BScore ← Score + 10 | |
| 3A game keeps the score because it matters, but ignores details that do not affect play | CDECLARE BusStop : STRING | |
| 4A bus route program stores only the stops it needs and nothing about the bus colour | DA school system keeps a detail it needs, such as a name, and leaves out details like favourite colour | |
| 5DECLARE ShoeColour : STRING // for a school timetable | EA programmer decides which details to leave out because they do not help solve the problem | |
| 6// Map program: store every tree and every leaf | FThis keeps far too much detail. Abstraction means keeping only useful details such as roads and landmarks and ignoring the rest. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
abstraction — Keeping only the details needed to solve a problem and leaving out the details that do not matter, e.g. a map shows roads but not every tree.// Abstraction keeps only the needed details// Hair colour is not needed for the score
DECLARE Score : INTEGER// A map shows roads but not every tree
OUTPUT RoadName// A school system keeps only needed data
DECLARE StudentName : STRING// Only price and quantity matter here
Total ← Price * Quantity