Digital ledger

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Digital ledger

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which statement describes a digital ledger?
A A ledger stored electronically, with records kept as data on computers
B A ledger written by hand in a book and kept in a safe
2. What is the main job of a digital ledger?
A To print new coins and notes
B To keep a record of transactions
3. Which is an advantage of a digital ledger over a paper ledger?
A Records are easy to search and copy
B Records can only be read by one person in one room
4. How are records kept in a digital ledger?
A As ink on pages
B As data stored on computers
5. Why does digital currency need a digital ledger?
A To track who owns what
B To turn the currency into physical coins

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1digital ledger Abackup = ledger.copy()
2ledger.search("Ava") BDigital currency still needs a ledger. With no physical coins or notes, a digital ledger is how the system tracks who owns what.
3A digital ledger stores each record as data, such as a row in a table, rather than as handwriting on paper CThis describes a paper ledger. A digital ledger is stored electronically, so its records are kept as data on computers.
4Because the records are data, a digital ledger can be copied easily to another computer Dledger = [["Ava", "Ben", 5]]
5A digital ledger is a book where records are written by hand with a pen EFinds every record that mentions Ava in a digital ledger
6Digital currency does not need a ledger because there are no coins or notes to track FA ledger stored electronically as data on computers instead of on paper

Definitions

digital ledger

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
______[1] ← "Ava pays Ben 5"
2.
OUTPUT ledger[_]
3.
IF ledger[2] = "Ben pays Cy 3" ____ OUTPUT "Found" ENDIF
4.
backup _ ledger OUTPUT backup[1]
5.
owner ← ledger[3] OUTPUT "Coin 7 is owned by " & _____

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A ledger = []
B ledger.add("Ava>Ben 5")
C print(len(ledger))
Question 2
A ledger = ()
B ledger.append("Zoe>Leo 3")
C print(ledger[0])
Question 3
A ledger = []
B ledger.append("Mia>Noah 2")
C ledger.append("Noah>Isla 1")
D print(ledger.len())
Question 4
A ledger = ["A>B 5" "B>Z 2"]
B for rec in ledger:
C if "B" in rec:
D print(rec)
Question 5
A ledger = ["A>B 5"]
B backup = ledger.copy()
C print(backup = ledger)

Answer Key

Digital ledger
Section A: Quick Questions
Q1
A — A ledger stored electronically, with records kept as data on computers
Q2
B — To keep a record of transactions
Q3
A — Records are easy to search and copy
Q4
B — As data stored on computers
Q5
A — To track who owns what
Section B: Match the Pairs
Q1
digital ledger → A ledger stored electronically as data on computers instead of on paper
Q2
ledger.search("Ava") → Finds every record that mentions Ava in a digital ledger
Q3
A digital ledger stores each record as data, such as a row in a table, rather than as handwriting on paper → ledger = [["Ava", "Ben", 5]]
Q4
Because the records are data, a digital ledger can be copied easily to another computer → backup = ledger.copy()
Q5
A digital ledger is a book where records are written by hand with a pen → This describes a paper ledger. A digital ledger is stored electronically, so its records are kept as data on computers.
Q6
Digital currency does not need a ledger because there are no coins or notes to track → Digital currency still needs a ledger. With no physical coins or notes, a digital ledger is how the system tracks who owns what.
Section C: Definitions
Q1
digital ledger — A ledger stored electronically instead of on paper. Records are kept as data on computers, so they are easy to search and copy. Digital currency uses one to track who owns what.
Section D: Fill in the Blanks
Q1
ledger[1] ← "Ava pays Ben 5"
Q2
OUTPUT ledger[1]
Q3
IF ledger[2] = "Ben pays Cy 3" THEN OUTPUT "Found" ENDIF
Q4
backup ← ledger OUTPUT backup[1]
Q5
owner ← ledger[3] OUTPUT "Coin 7 is owned by " & owner
Section E: Spot the Error
Q1
B — A Python list has no add() method. A new record is put on the end of the digital ledger with append(), so the line should be ledger.append("Ava>Ben 5").
Q2
A — A tuple () cannot be changed, so new records cannot be appended to it. A digital ledger that grows needs a list, so it should be ledger = [].
Q3
D — Lists do not have a len() method. To count the records stored in the digital ledger, use the len() function: print(len(ledger)).
Q4
A — The comma between the two records is missing. Items in a list must be separated by commas so each record is stored separately and can be searched.
Q5
C — A single = assigns a value and cannot be used inside print() to compare. To check that the copy matches the original ledger, use ==.