Logic and computer systems · GCSE · OCR J277 1.2.2, AQA 8525 3.4.5, Edexcel 1CP2 3.1.2 · about 15 min
Magnetic, optical, solid state and cloud storage, and choosing between them.
[1 mark]Why do computers need secondary storage?
[1 mark]Which storage suits a robot that vibrates across a mat?
[1 mark]How does optical storage read data?
[1 mark]What is an advantage of a hard disk over an SSD?
[1 mark]What is a drawback of cloud storage?
[1 mark]Copying a 3000 MB file at 150 MB per second takes how many seconds?
Write choose(needed_gb, no_moving_parts). It returns the name of the cheapest device in devices whose capacity is at least needed_gb, and which has no moving parts if no_moving_parts is True. A device's price in pence is its capacity times its pence per GB. Print one line for each job in jobs, in the form robot logs: SD card.
# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()
# name, capacity in GB, pence per GB, has moving parts
devices = [
("hard disk", 2000, 2, True),
("SSD", 1000, 6, False),
("SD card", 256, 10, False),
("Blu-ray", 50, 4, True),
]
# job, GB needed, needs no moving parts
jobs = [("robot logs", 64, True), ("school backups", 1500, False), ("video editing", 500, True), ("film archive", 40, False)]Plan your program here, then type it in and press Run.
choose require a minimum speed.