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 | |
|---|---|---|
| 1for i in range(len(items)): for j in range(len(items)): | AThis definition is wrong. Correctness is effectiveness, while efficiency is about how well resources such as time, memory, storage and user effort are used. | |
| 2del bigList | BNested loops that check every item against every other item can slow a program down as the data grows, which hurts processing speed. | |
| 3Saving the user time and effort by remembering their details so they do not retype them each visit | CFrees up memory by removing a large list that is no longer needed, so the solution uses less memory. | |
| 4Using less storage by compressing a large file before saving it | DThe whole database is reloaded inside the loop for every customer. This wastes processing time and memory. It should be loaded once before the loop. | |
| 5for each customer in customers load entire database again check customer | EzipFile(report, "report.zip") | |
| 6Efficiency means a solution works correctly and nothing else | F<input type="text" name="email" autocomplete="email"> |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
efficiency — How well a solution uses resources such as time, processing, memory, storage and user effort to do its job. An efficient solution is fast, light on memory and storage, and saves the user time.i ← 1
WHILE found = FALSE AND i <= ntotal ← 0
FOR i ← 1 TO 100
total ← total + mark[i]name : String
age : Integer
isMember : BooleanINPUT price, qty
total ← price * qty
DISPLAY totalFOR i ← 1 TO 50
total ← total + price[i]
END FOR