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 | |
|---|---|---|
| 1Scenario: a web app for many different computers | AHigh-level, because the app must be portable and run on many machines | |
| 2Scenario: a device driver that controls a printer | BLow-level, because the controller needs direct access to hardware | |
| 3A justified answer links the language level to a need of the task | CLow-level code is machine dependent, so it is not portable. A high-level language should be chosen. | |
| 4An embedded controller needing exact memory and hardware control suits a low-level language | DChoose a high-level language, because it is machine independent and runs on many machines | |
| 5Use assembly language for a portable app that must run on many different computers | EThe answer gives no justification. It must link the choice to the task's needs, such as direct hardware control. | |
| 6Use a high-level language because it is good. (no link to the task) | FChoose a low-level language, because it can directly manipulate the hardware |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
choose language level — Pick high-level for portable programs on many machines; pick low-level for direct hardware control, like drivers. Then justify the choice by linking it to the task's needs.IF runsOnManyMachines THEN
level ← "high-level"
ENDIFIF task = "device driver" THEN
level ← "low-level"
ENDIFneedsPortability ← TRUE
IF needsPortability = TRUE THEN
level ← "high-level"level ← "high-level"
reason ← "it runs on many machines"
OUTPUT level + " because " + reasonIF device = "embedded controller" THEN
level ← "low-level"
ENDIF