Digital wallets

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

Digital wallets

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What is a digital wallet?
A An app or software that stores your digital currency and is used to send and receive it
B A leather case that holds coins and notes
2. Where can a digital wallet be stored?
A On a phone or a computer
B Only inside a bank vault
3. Which action can you do with a digital wallet?
A Print new coins and notes
B Send and receive digital currency payments
4. What does a digital wallet hold that lets you use your currency?
A A paper copy of every transaction in the world
B The access details to your digital currency
5. A student loses their phone and has no way into their wallet. What could happen?
A They could lose their digital currency
B Their currency is always safely returned automatically

Match the Pairs

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

Left columnRight column
1wallet.send("Sam", 0.5) AA digital wallet is software or an app, not a physical purse that holds coins and notes
2balance = wallet.getBalance() BSends 0.5 units of digital currency from the wallet to another person
3A digital wallet is an app on a phone or computer that stores a person's digital currency CLosing access to a wallet can mean losing the digital currency stored in it
4A wallet is used to receive payments as well as send them Dwallet = WalletApp("phone")
5wallet = "physical leather purse" Ewallet.receive("Ana", 2)
6lostPhone -> currency is always safe FChecks how much digital currency the wallet gives access to

Definitions

digital wallet

Fill in the Blanks

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

1.
____(wallet, "Sam", 5)
2.
balance ← balance _ payment
3.
IF balance __ amount THEN SEND(wallet, "Sam", amount) ENDIF
4.
IF phoneLost THEN access ← _____
5.
wallet ← ____(privateKey)

Spot the Error

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

Question 1
A wallet ← OpenWallet("Sam")
B balance ← wallet.Send()
C OUTPUT "Balance: ", balance
Question 2
A balance ← 50
B balance ← balance - 10
C OUTPUT balance
Question 3
A friend ← "address_77X"
B amount ← 5
C wallet.Receive(friend, amount)
Question 4
A OUTPUT "Enter your password"
B INPUT password
C IF password <> wallet.key THEN
D wallet.Open()
E ENDIF
Question 5
A backup ← wallet.key
B phone ← "lost"
C wallet.Restore(phone)

Answer Key

Digital wallets
Section A: Quick Questions
Q1
A — An app or software that stores your digital currency and is used to send and receive it
Q2
A — On a phone or a computer
Q3
B — Send and receive digital currency payments
Q4
B — The access details to your digital currency
Q5
A — They could lose their digital currency
Section B: Match the Pairs
Q1
wallet.send("Sam", 0.5) → Sends 0.5 units of digital currency from the wallet to another person
Q2
balance = wallet.getBalance() → Checks how much digital currency the wallet gives access to
Q3
A digital wallet is an app on a phone or computer that stores a person's digital currency → wallet = WalletApp("phone")
Q4
A wallet is used to receive payments as well as send them → wallet.receive("Ana", 2)
Q5
wallet = "physical leather purse" → A digital wallet is software or an app, not a physical purse that holds coins and notes
Q6
lostPhone -> currency is always safe → Losing access to a wallet can mean losing the digital currency stored in it
Section C: Definitions
Q1
digital wallet — Software or an app on a phone or computer that stores a person's digital currency and is used to send and receive it. Losing access to it can mean losing the currency.
Section D: Fill in the Blanks
Q1
SEND(wallet, "Sam", 5)
Q2
balance ← balance + payment
Q3
IF balance >= amount THEN SEND(wallet, "Sam", amount) ENDIF
Q4
IF phoneLost THEN access ← FALSE
Q5
wallet ← OPEN(privateKey)
Section E: Spot the Error
Q1
B — To check how much currency the wallet holds you read its balance with wallet.GetBalance(). Send() is used to pay someone, not to read the balance.
Q2
B — Receiving a payment adds currency to the wallet, so the line should be balance ← balance + 10. Subtracting is what happens when you send.
Q3
C — The program is paying a friend, so it must use wallet.Send(friend, amount). Receive is used when money arrives in your wallet.
Q4
C — The wallet should only open when the password matches the key. Using <> would let in people who enter the wrong password, so it should be =.
Q5
C — A wallet is restored on a new device using the saved backup key. The lost phone cannot be used, so it should be wallet.Restore(backup).