← ACARA Digital Technologies Years 7–8

Spotting a missing packet from the packet numbers

A gap in the packet numbers received, like 1, 2, 4, 5, shows a packet is missing. The receiver knows the message is incomplete and can ask for a resend.

Understanding Spotting a missing packet from the packet numbers in ACARA Digital Technologies Years 7–8

What it does: The code checks for packet number 3 in the received list and records it as missing when it is not there. Once the receiver knows packet 3 is missing, it asks the sender to send that packet again. The jump from 2 to 4 is a gap in the numbers. That shows packet 3 has not arrived. All 5 packets are needed to rebuild the whole message. With one missing, the message is incomplete. 1, 2, 4, 5 skips number 3. The set 1, 2, 3, 4, 5 with no skips would be complete.

Common mistakes: The message only has packets 1 to 5, so packet 6 does not exist. The list should be [1, 2, 4, 5]. With 5 numbers the count would equal the total and packet 3 would not be noticed. The message has 5 packets in total, so total should be 5. If total is 4, it matches the 4 packets received and the missing packet 3 is never spotted.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 69–124) and word search (Modules 69–152).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Packets numbered 1, 2, 4, 5 arrive. What does the gap tell the receiver?
Packet 3 arrived twicePacket 3 is missing
Matches
Received 1, 2, 4, 5 of 5: all packets arrived
↓
Only four of the five packets arrived. The numbers skip 3, so packet 3 is missing and the message is incomplete.
Applying
Meanings
Term
missing packet
Meaning
A gap in the packet numbers received, like 1, 2, 4, 5, shows a packet is missing. The receiver knows the message is incomplete and can ask for a resend.
Practice
total ← 5
Testing
Gaps
DISPLAY "Packet " + + " is missing"
Check Answer
Spots
1total ← 5
2received ← [1, 2, 4, 5, 6]

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Camel' badge — Endurance Champion, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Packets numbered 1, 2, 4, 5 arrive. What does the gap tell the receiver?
A. Packet 3 is missing ✓
B. Packet 3 arrived twice
The jump from 2 to 4 is a gap in the numbers. That shows packet 3 has not arrived.
2. A message was sent as 5 packets. Only packets 1, 2, 4 and 5 arrive. Is the message complete?
A. No, it is incomplete ✓
B. Yes, 4 packets is enough
All 5 packets are needed to rebuild the whole message. With one missing, the message is incomplete.
3. How does the receiver know a packet is missing?
A. The packets arrive very quickly
B. There is a gap in the packet numbers ✓
Each packet has a number in its header. A gap in the sequence, like 1, 2, 4, 5, gives the missing packet away.
4. Which set of received packet numbers shows a missing packet?
A. 1, 2, 3, 4
B. 1, 2, 4, 5 ✓
1, 2, 4, 5 skips number 3. The set 1, 2, 3, 4, 5 with no skips would be complete.
5. A header says 'packet 2 of 5'. How does this help the receiver spot a missing packet?
A. It gives the total count to check against ✓
B. It tells the packet which route to take
The total packet count (5) lets the receiver check it has received every packet, even if the last one is the one missing.

Match the Pairs

Received: 1, 2, 4, 5 → Packet 3 is missing, because there is a gap in the numbers
Packet 2 of 5 → The total packet count is 5, so the receiver expects numbers 1 to 5
A gap in the packet numbers shows a packet is missing and the message is incomplete → if 3 not in received: missing = 3
After spotting a missing packet, the receiver asks the sender for a resend → send('Please resend packet 3')
Received 1, 2, 4, 5 of 5: all packets arrived → Only four of the five packets arrived. The numbers skip 3, so packet 3 is missing and the message is incomplete.
Received 1, 2, 3, 4 of 5: complete → The total is 5, so packet 5 is missing. The receiver must check the numbers against the total, not just look for gaps in the middle.

Key Term

missing packet
A gap in the packet numbers received, like 1, 2, 4, 5, shows a packet is missing. The receiver knows the message is incomplete and can ask for a resend.

Fill in the Blanks

1. received ← [1, 2, 4, 5] DISPLAY "Packet " + 3 + " is missing"
Hint: Type the packet number that has a gap in the received list.
2. IF LENGTH(received) < total THEN DISPLAY "Please resend packet 3" END IF
Hint: Type the comparison operator that shows fewer packets arrived than expected.
3. IF 3 NOT IN received THEN DISPLAY "Packet 3 is missing" END IF
Hint: Type the keywords that test whether a number is absent from the received list.
4. FOR n = 1 TO total IF n NOT IN received THEN DISPLAY n NEXT n
Hint: Type the variable that holds how many packets the message should have.
5. IF LENGTH(received) = total THEN DISPLAY "Message complete" ELSE DISPLAY "Resend missing packet"
Hint: Type the keyword that runs when the packet count does not match the total.

Spot the Error

Question 1
A total ← 5
B received ← [1, 2, 4, 5, 6]
C IF LENGTH(received) < total THEN
D OUTPUT "Packet missing"
Line B — The message only has packets 1 to 5, so packet 6 does not exist. The list should be [1, 2, 4, 5]. With 5 numbers the count would equal the total and packet 3 would not be noticed.
Question 2
A total ← 4
B received ← [1, 2, 4, 5]
C IF LENGTH(received) < total THEN
D OUTPUT "Packet 3 is missing"
Line A — The message has 5 packets in total, so total should be 5. If total is 4, it matches the 4 packets received and the missing packet 3 is never spotted.
Question 3
A prev ← 2
B next ← 4
C IF next - prev < 1 THEN
D OUTPUT "Packet missing"
Line C — Numbers 2 then 4 have a gap of 2. A gap means the difference is greater than 1, so the test should be next - prev > 1. Using < 1 would never be true.
Question 4
A total ← 5
B count ← 4
C missing ← count - total
D OUTPUT missing, " packet missing"
Line C — The number of missing packets is the total minus the count received, so it should be total - count. Swapping them gives -1, which makes no sense.
Question 5
A received ← [1, 2, 4, 5]
B total ← 5
C IF LENGTH(received) = total THEN
D OUTPUT "Packet missing"
E ELSE
F OUTPUT "Packet missing"
Line D — This line is in the branch where the count equals the total, so every packet has arrived. It should say "Message complete". The message "Packet missing" belongs in the ELSE branch.

Student with a class code? Join your class →