← IGCSE Computer Science Paper 1

Blocks joined in a chain

Blocks are added one after another in time order. Each new block goes on the end and links to the block before it, so the blocks form a chain.

Understanding Blocks joined in a chain in IGCSE Computer Science Paper 1

What it does: The times increase along the chain, showing the order of the blocks follows the order in which they were added. A new block links back to the previous block. This link is what joins the blocks into a chain. The broken code puts a new block in the middle, but the correct way is to add Block 6 after the newest block so the time order stays correct.

Common mistakes: A new block must go on the end of the chain. insert(0, ...) puts it at the start. It should be chain.append(new_block). Each block links to the block directly before it. block4 should link to block3, not skip back to block1: block4.previous = block3.

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 510–519) and word search (Modules 510–546).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Where is a new block added in a blockchain?
At the start of the chain, before the first blockOn the end of the chain, after the latest block
Matches
New Block 6 is inserted between Block 2 and Block 3
↓
New blocks must be added to the end of the chain, not into the middle. Inserting a block breaks the time order of the chain.
Applying
Meanings
Term
chain of blocks
Meaning
Blocks are added one after another in time order. Each new block goes on the end and links to the block before it, so the blocks form a chain.
Practice
Block1.previous ← "none"
Testing
Gaps
Block3.previous ←
Check Answer
Spots
2new_block = block3
3chain.insert(0, new_block)

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

The 'Silverback Gorilla' badge — Savannah Master, 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. Where is a new block added in a blockchain?
A. On the end of the chain, after the latest block ✓
B. At the start of the chain, before the first block
New blocks always go on the end. Each one is added after the most recent block, so the chain grows in time order.
2. Which statement about how blocks are linked is correct?
A. Each new block links to the block before it ✓
B. Each new block links only to the next block that has not been made yet
A new block links back to the previous block. This link is what joins the blocks into a chain.
3. In what order are the blocks in a blockchain arranged?
A. Alphabetical order of the names of the people sending money
B. Time order, from the oldest block to the newest ✓
The order of blocks follows time. The oldest block is at the start and the newest block is at the end.
4. A chain has Block 1, Block 2 and Block 3. Block 4 is made next. What is the new order?
A. Block 4, Block 1, Block 2, Block 3
B. Block 1, Block 2, Block 3, Block 4 ✓
Block 4 is the newest, so it goes on the end after Block 3 and links back to Block 3.
5. You draw a blockchain as a row of boxes. What should join the boxes?
A. An arrow or line from each block back to the previous block ✓
B. No links, because each block stands on its own
A chain diagram shows each block linked to the one before it. Without the links it would only be a set of separate blocks.

Match the Pairs

Block 3 -> Block 2 -> Block 1 → Each block links back to the block before it, so the blocks form a chain
chain = [B1, B2, B3]; chain.append(B4) → A new block is added to the end of the chain, after the newest existing block
Blocks are kept in time order, with the oldest block first and the newest block last → Block 1 (09:00) <- Block 2 (09:10) <- Block 3 (09:20)
Each new block stores a link to the block before it → Block 5: previous = Block 4
New Block 6 is inserted between Block 2 and Block 3 → New blocks must be added to the end of the chain, not into the middle. Inserting a block breaks the time order of the chain.
Block 4: previous = none (but Blocks 1 to 3 already exist) → A block that is not the first one must link to the block before it. Here Block 4 is not linked, so it is not joined to the chain.

Key Term

chain of blocks
Blocks are added one after another in time order. Each new block goes on the end and links to the block before it, so the blocks form a chain.

Fill in the Blanks

1. Block3.previous ← Block2
Hint: Type the name of the earlier block that block 3 links back to.
2. APPEND Block4 TO chain
Hint: Type the keyword that puts a new block on the end of the chain.
3. Block5.previous ← Block4
Hint: Type the field name that stores the link to the block before this one.
4. IF Block2.time > Block1.time THEN OUTPUT "Block 2 is newer" ENDIF
Hint: Type the comparison operator showing the later block has a later time-stamp.
5. [Block 1]<-[Block 2]<-[Block 3]<-[Block 4]
Hint: Type the number of the next block added to the end of the chain.

Spot the Error

Question 1
A chain = [block1, block2]
B new_block = block3
C chain.insert(0, new_block)
Line C — A new block must go on the end of the chain. insert(0, ...) puts it at the start. It should be chain.append(new_block).
Question 2
A block1.previous = None
B block2.previous = block1
C block3.previous = block2
D block4.previous = block1
Line D — Each block links to the block directly before it. block4 should link to block3, not skip back to block1: block4.previous = block3.
Question 3
A block1.time = "09:00"
B block2.time = "09:05"
C block3.time = "08:55"
Line C — Blocks follow time order. block3 comes after block2 (09:05), so its time must be later, such as 09:10, not 08:55.
Question 4
A new ← NewBlock()
B new.previous ← new
C APPEND new TO chain
Line B — The new block must link to the last block already in the chain. It cannot link to itself. It should be new.previous ← last_block.
Question 5
A chain = [block1]
B chain = [block2]
C chain.append(block3)
D print(len(chain))
Line B — This replaces the whole chain, so block1 is lost. A block must be added to the end with chain.append(block2).

Student with a class code? Join your class →