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 | |
|---|---|---|
| 1packet | A{from: 'Maya', to: 'School', order: 2, data: 'llo'} | |
| 2packet 3 of 5 | BThe packets must be put back in order using their order numbers before the message is read, so it should be read as 1, 2, 3. | |
| 3Each packet carries the sender, the destination, an order number and a piece of the data | CThe order number tells the destination where this piece fits when the data is reassembled | |
| 4Packets can take different routes but are reassembled in order at the destination | DA small chunk of data with the sender, destination and order number attached | |
| 5A whole 5 MB photo is sent as one single piece through the network | EData is not sent as one big piece. It is split into small packets that travel separately and are reassembled at the destination. | |
| 6Packets 3, 1, 2 arrive, so the message is read as 3, 1, 2 | Farrive: 3, 1, 2 -> sort by order -> 1, 2, 3 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
packet — A small chunk of data with the sender, destination and order number attached. Packets travel a network by different routes and are put back in order at the destination.packet = {data: "Hi", order: 1,
sender: "PC1", destination: "PC2"}packet = {data: "lo", sender: "PC1",
destination: "PC2", order: 2}packets = split(message)
send(packets[1], route_a)
send(packets[2], route_b)arrived = [packet3, packet1, packet2]
message = sort(arrived, by=order)if received == total:
message = join(sorted_packets)