← IGCSE Computer Science Paper 1

Ledger

A record book listing every transaction, so you can see who paid whom and how much. It is used to work out balances and keep an accurate history.

Understanding Ledger in IGCSE Computer Science Paper 1

What it does: Each item in the list is one transaction record, which shows that a ledger is a list of records with one entry per transaction. Shops and banks have long used paper ledgers to record transactions. A digital wallet stores digital money for a user. A ledger shows who paid whom and how much. Keeping an accurate history is a main purpose of a ledger. A ledger records transactions but does not speed them up. A ledger lists every transaction, so the history is complete. A ledger is used to work out balances by adding the money received and taking away the money paid out.

Common mistakes: A ledger holds one record per transaction, so it must start as an empty list: ledger ← []. A number cannot have records appended to it. Paying money out lowers the balance. The line should subtract the payment: balance ← balance - payment.

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 500–509) and word search (Modules 490–509).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Which best describes a ledger?
A machine that prints new coins and notesA record book that lists every transaction
Matches
ledger = ["Ava", "Liam"]
↓
The records only list names. A ledger record must also show how much was paid, so the amount is missing.
Applying
Meanings
Term
ledger
Meaning
A record book listing every transaction, so you can see who paid whom and how much. It is used to work out balances and keep an accurate history.
Practice
DECLARE ledger : ARRAY[1:3] OF STRING
Testing
Gaps
← []
Check Answer
Spots
1ledger ← 0
2APPEND ledger, "Ava pays Ben 5"

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

The 'Snow Leopard' badge — Silent Debugger, 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. Which best describes a ledger?
A. A record book that lists every transaction ✓
B. A machine that prints new coins and notes
A ledger is a record book. It lists every transaction so you can see who paid whom and how much.
2. How many entries does a ledger usually have for each transaction?
A. One record per transaction ✓
B. One record for the whole year
A ledger is a list of records, one for each transaction.
3. A shop writes every sale and payment in a book. What is this book called?
A. A digital wallet
B. A paper ledger ✓
Shops and banks have long used paper ledgers to record transactions. A digital wallet stores digital money for a user.
4. A bank wants to work out how much money a customer has. What should it use?
A. Add up the transactions in the ledger ✓
B. Guess from the customer's last payment
Ledgers are used to work out balances. The balance comes from all of the recorded transactions.
5. A ledger shows that Sam paid Priya $20. What can you tell from this record?
A. Only that some money moved, with no names
B. Who paid whom and how much ✓
A ledger shows who paid whom and how much.

Match the Pairs

ledger → A record book that lists every transaction, showing who paid whom and how much
balance = total_in - total_out → Working out how much money someone has by adding up the ledger records
A ledger holds one record for each transaction, so the records form a list → ledger = [t1, t2, t3]
A ledger entry shows who paid whom and how much → record = ("Ava", "Liam", 20)
ledger = ["Ava", "Liam"] → The records only list names. A ledger record must also show how much was paid, so the amount is missing.
ledger = [t1, t2] ledger.clear() → Clearing the ledger deletes every record. A ledger must keep an accurate history of all transactions, so records must not be wiped.

Key Term

ledger
A record book listing every transaction, so you can see who paid whom and how much. It is used to work out balances and keep an accurate history.

Fill in the Blanks

1. ledger ← []
Hint: Type the variable name for the record book that will hold every transaction as an empty list.
2. balance ← 100 FOR EACH t IN ledger balance ← balance + t.amount
Hint: Type the operator that adds each amount to the running balance.
3. total ← 0 FOR EACH t IN ledger total ← total + t.amount
Hint: Type the loop keywords that visit every record in the list, one at a time.
4. ledger ← [t1, t2, t3] OUTPUT LENGTH(ledger)
Hint: Type the function name that counts how many records are in the list.
5. FOR EACH t IN ledger OUTPUT t.payer, "paid", t.payee, t.amount
Hint: Type the field name that stores who received the money in each record.

Spot the Error

Question 1
A ledger ← 0
B APPEND ledger, "Ava pays Ben 5"
C APPEND ledger, "Ben pays Cy 2"
D OUTPUT LENGTH(ledger)
Line A — A ledger holds one record per transaction, so it must start as an empty list: ledger ← []. A number cannot have records appended to it.
Question 2
A balance ← 100
B payment ← 30
C balance ← balance + payment
D OUTPUT balance
Line C — Paying money out lowers the balance. The line should subtract the payment: balance ← balance - payment.
Question 3
A ledger ← []
B record ← "Ava,Ben,5"
C APPEND ledger, record
D OUTPUT LENGTH(record)
Line D — The number of transactions recorded is the length of the ledger list, LENGTH(ledger). LENGTH(record) would count the characters in one record.
Question 4
A total ← 0
B FOR i ← 1 TO 3
C total ← amount[i]
D NEXT i
E OUTPUT total
Line C — This overwrites the total on every loop instead of adding to it. It should be total ← total + amount[i] so the ledger amounts are summed.
Question 5
A balance ← 50
B IF balance <= 20 THEN
C balance ← balance - 20
D ENDIF
Line B — The payment should only be recorded when the balance is at least the amount. The condition should be balance >= 20, not <=.

Student with a class code? Join your class →