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 | |
|---|---|---|
| 1interval = 1 (seconds) | AThe sensor logs a reading every second, giving lots of detail but a very large file | |
| 2interval = 3600 (seconds) | BAn hourly interval can miss a spike that starts and ends between two readings, so the spike may never appear in the data. | |
| 3A short logging interval gives more detail but creates a bigger file | CThe sensor logs one reading per hour, saving space but possibly missing fast changes | |
| 4A long logging interval saves storage space because fewer readings are stored | Dreadings_per_day = 24 / interval_hours | |
| 5A 2-minute spike in temperature is logged every 1 hour, so every spike will be recorded. | Ereadings_per_day = 86400 / interval | |
| 6Logging every second for a month is best because the file size does not matter. | FFile size does matter: a very short interval over a long period creates a huge dataset that takes up storage and is slow to process. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
logging interval — How often a sensor records a reading. Short intervals give more detail but bigger files; long intervals save space but can miss fast changes.# Log one reading every hour
interval = 3600perDay = 86400 / intervalinterval = 10
logReading()
sleep(interval)if interval > spike:
print("Spike may be missed")if size > limit:
interval = interval * 2
print("Longer interval set")