Using digital currency to pay for goods and services

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

Using digital currency to pay for goods and services

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which is a way to pay for goods with digital currency?
A Post a bundle of coins to the online shop
B Pay an online shop that accepts it, using your wallet app
2. Where can you spend digital currency?
A Only at businesses that accept it
B At every shop in the world
3. What does a payment from your wallet app become?
A An electronic transaction sent over the internet
B A paper receipt that is posted to the shop
4. Which of these can you buy with digital currency?
A Goods and services, such as a game or a music subscription
B Nothing, because it can only be saved and never spent
5. You are at the online checkout of a shop that accepts digital currency. What do you do?
A Hand over digital coins to the delivery driver
B Choose to pay with digital currency and approve the payment from your wallet

Match the Pairs

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

Left columnRight column
1wallet.send(shop, 0.002) ASends a payment from your wallet app to a business as an electronic transaction.
2shop.accepts(digitalCurrency) Bcheckout.payWith("digital currency")
3Online shopping: at the checkout you choose to pay for your basket using digital currency. CChecks that the business takes digital currency, so you can pay it for goods or services.
4Paying from a wallet app creates an electronic transaction that goes from your wallet to the business's wallet. Dtransaction = (myWallet, shopWallet, 0.01)
5pay(shop, coinsFromPocket) EDigital currency is not physical coins. It is paid electronically from a wallet app, for example wallet.send(shop, amount).
6pay(anyShop, digitalCurrency) FDigital currency can only be spent at businesses that accept it, so check shop.accepts(digitalCurrency) first.

Definitions

Paying with digital currency

Fill in the Blanks

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

1.
price ← 15 balance ← balance _ price
2.
IF balance >= price ____ SEND(wallet, shop, price)
3.
SEND(wallet, shop, price) ______ "Payment sent"
4.
shop ← "Bookshop" SEND(wallet, ____, price)
5.
IF balance >= price THEN SEND(wallet, shop, price) ____ OUTPUT "Not enough funds"

Spot the Error

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

Question 1
A price ← 15
B balance ← 100
C balance ← balance + price
D OUTPUT balance
Question 2
A wallet ← CLOSE_APP()
B shop ← SELECT_SHOP()
C SEND_PAYMENT(wallet, shop)
Question 3
A item ← "Headphones"
B cost ← 45
C IF balance <= cost THEN
D PAY(cost)
E ENDIF
Question 4
A sender ← myWallet
B shop ← myWallet
C amount ← 20
D SEND(sender, shop, amount)
Question 5
A coin ← "Bitcoin"
B accepted ← shopAccepts(coin)
C IF accepted = FALSE THEN
D PAY(coin)
E ENDIF

Answer Key

Using digital currency to pay for goods and services
Section A: Quick Questions
Q1
B — Pay an online shop that accepts it, using your wallet app
Q2
A — Only at businesses that accept it
Q3
A — An electronic transaction sent over the internet
Q4
A — Goods and services, such as a game or a music subscription
Q5
B — Choose to pay with digital currency and approve the payment from your wallet
Section B: Match the Pairs
Q1
wallet.send(shop, 0.002) → Sends a payment from your wallet app to a business as an electronic transaction.
Q2
shop.accepts(digitalCurrency) → Checks that the business takes digital currency, so you can pay it for goods or services.
Q3
Online shopping: at the checkout you choose to pay for your basket using digital currency. → checkout.payWith("digital currency")
Q4
Paying from a wallet app creates an electronic transaction that goes from your wallet to the business's wallet. → transaction = (myWallet, shopWallet, 0.01)
Q5
pay(shop, coinsFromPocket) → Digital currency is not physical coins. It is paid electronically from a wallet app, for example wallet.send(shop, amount).
Q6
pay(anyShop, digitalCurrency) → Digital currency can only be spent at businesses that accept it, so check shop.accepts(digitalCurrency) first.
Section C: Definitions
Q1
Paying with digital currency — Spending digital currency online or in shops that accept it to buy goods and services. The payment is sent from your wallet app as an electronic transaction.
Section D: Fill in the Blanks
Q1
price ← 15 balance ← balance - price
Q2
IF balance >= price THEN SEND(wallet, shop, price)
Q3
SEND(wallet, shop, price) OUTPUT "Payment sent"
Q4
shop ← "Bookshop" SEND(wallet, shop, price)
Q5
IF balance >= price THEN SEND(wallet, shop, price) ELSE OUTPUT "Not enough funds"
Section E: Spot the Error
Q1
C — Paying for something takes money out of your wallet, so the price must be subtracted: balance ← balance - price.
Q2
A — You pay from a wallet app, so the app must be opened (OPEN_APP), not closed, before the payment can be sent.
Q3
C — You can only pay if your balance is greater than or equal to the cost. The condition should be balance >= cost.
Q4
B — The payment must go to the business's wallet (shopWallet). Using myWallet would send the money back to yourself.
Q5
C — You can only pay with digital currency where the business accepts it. The payment should happen when accepted = TRUE.