Ethereum is a platform that lets people create and run programs called smart contracts on a shared computer network. It helps make money digital and programmable.
Click to reveal answer
beginner
What does 'programmable money' mean?
Programmable money means money that can follow rules set by computer programs automatically, like sending payments only when certain conditions happen.
Click to reveal answer
intermediate
How do smart contracts enable programmable money on Ethereum?
Smart contracts are like digital agreements that run on Ethereum. They automatically handle money based on the rules written in code, without needing a middleman.
Click to reveal answer
intermediate
Why is Ethereum's blockchain important for programmable money?
Ethereum's blockchain keeps a secure and shared record of all transactions and smart contract actions. This makes sure money rules are followed and can't be changed by one person.
Click to reveal answer
beginner
Give an example of programmable money using Ethereum.
You can create a smart contract that sends money to your friend only if they finish a task, like completing a project. The contract checks the task and sends money automatically.
Click to reveal answer
What is the main feature that makes Ethereum different from Bitcoin?
AIt allows running smart contracts to program money.
BIt only stores transaction history.
CIt uses paper money.
DIt is a social media platform.
✗ Incorrect
Ethereum allows running smart contracts, which lets money be programmed with rules.
What is a smart contract?
AA digital agreement that runs automatically on Ethereum.
BA paper contract signed by lawyers.
CA type of cryptocurrency wallet.
DA social media post.
✗ Incorrect
Smart contracts are programs on Ethereum that automatically enforce rules.
Why does Ethereum use a blockchain?
ATo send emails.
BTo keep a secure and shared record of transactions and contracts.
CTo store photos and videos.
DTo play games.
✗ Incorrect
The blockchain ensures all actions are recorded securely and transparently.
What does 'programmable money' allow you to do?
AHide money from banks.
BPrint physical cash at home.
CSet rules for how money is sent or used automatically.
DMake money disappear.
✗ Incorrect
Programmable money follows rules set in code to automate payments or actions.
Which of these is an example of programmable money?
AUsing cash to buy groceries.
BGiving money to anyone anytime without rules.
CKeeping money under your mattress.
DSending money only after a task is done.
✗ Incorrect
Programmable money can send funds automatically when conditions like task completion are met.
Explain how Ethereum enables money to be programmable.
Think about how programs can control money without a bank.
You got /4 concepts.
Describe a real-life example where programmable money on Ethereum could be useful.
Imagine paying someone only if they complete a job.
You got /4 concepts.
Practice
(1/5)
1. Why does Ethereum enable money to be programmable?
easy
A. Because it uses smart contracts that run code automatically
B. Because it stores money only in physical wallets
C. Because it requires banks to approve transactions
D. Because it uses paper currency for transactions
Solution
Step 1: Understand Ethereum's core feature
Ethereum uses smart contracts, which are pieces of code that run automatically on the blockchain.
Step 2: Connect smart contracts to programmable money
Smart contracts can control money by following rules written in code, making money programmable without middlemen.
Final Answer:
Because it uses smart contracts that run code automatically -> Option A
Quick Check:
Smart contracts = Programmable money [OK]
Hint: Smart contracts run code to control money automatically [OK]
Common Mistakes:
Thinking Ethereum uses physical wallets only
Assuming banks approve Ethereum transactions
Confusing Ethereum with paper currency systems
2. Which of the following is the correct way to define a simple smart contract function in Solidity that sends Ether?
easy
A. function sendEther(payable recipient) public payable { recipient.send(msg.value); }
B. function sendEther(address payable recipient) public payable { recipient.transfer(msg.value); }
C. function sendEther(address recipient) private { recipient.transfer(msg.value); }
D. function sendEther(address recipient) public { recipient.send(msg.value); }
Solution
Step 1: Check function signature for sending Ether
The function must be public and payable to receive and send Ether, and the recipient must be declared payable.
Step 2: Verify the transfer method usage
Using recipient.transfer(msg.value) correctly sends the Ether amount received in the call.
Final Answer:
function sendEther(address payable recipient) public payable { recipient.transfer(msg.value); } -> Option B
Quick Check:
Payable recipient + public payable function + transfer = Correct [OK]
Hint: Use 'address payable' and 'payable' function to send Ether [OK]
Common Mistakes:
Missing 'payable' keyword on function or address
Using 'send' without checking return value
Declaring function as private when it should be public
3. What will be the output of this Solidity code snippet when the function checkBalance() is called after sending 5 Ether to the contract?
contract Wallet {
uint public balance;
function deposit() public payable {
balance += msg.value;
}
function checkBalance() public view returns (uint) {
return balance;
}
}
medium
A. 5000000000000000000
B. 5
C. 0
D. Compilation error
Solution
Step 1: Understand msg.value unit in Solidity
Ether values in Solidity are handled in wei, where 1 Ether = 10^18 wei.
Step 2: Calculate balance after deposit
Sending 5 Ether means msg.value = 5 * 10^18 wei = 5000000000000000000 wei, which is added to balance.
Hint: Remember Ether is in wei (1 Ether = 10^18 wei) [OK]
Common Mistakes:
Returning Ether as 5 instead of wei
Confusing balance with contract's actual Ether balance
Expecting output in Ether units without conversion
4. Identify the error in this Solidity smart contract code that tries to send Ether to an address:
contract Pay {
function payTo(address recipient) public payable {
recipient.transfer(msg.value);
}
}
medium
A. transfer() cannot be used to send Ether
B. The function should not be payable
C. msg.value cannot be used inside the function
D. The recipient address must be declared payable
Solution
Step 1: Check recipient address type
In Solidity, to send Ether, the recipient address must be declared as payable.
Step 2: Identify missing payable keyword
The code uses 'address recipient' instead of 'address payable recipient', causing a compilation error.
Final Answer:
The recipient address must be declared payable -> Option D
Quick Check:
Address payable needed to send Ether [OK]
Hint: Use 'address payable' for recipients receiving Ether [OK]
Common Mistakes:
Forgetting 'payable' on recipient address
Thinking transfer() is invalid
Removing payable from function incorrectly
5. You want to create a smart contract that automatically sends 1 Ether to a specific address every time it receives at least 2 Ether. Which approach best uses Ethereum's programmable money feature?
hard
A. Use an external script to monitor the contract and send Ether when balance is 2 Ether
B. Manually send Ether from your wallet to the address after receiving 2 Ether
C. Write a payable function that checks if msg.value >= 2 Ether, then sends 1 Ether to the address using transfer()
D. Set a timer outside Ethereum to send Ether every day
Solution
Step 1: Use smart contract code to automate sending
Writing a payable function that checks the amount received and sends Ether automatically uses Ethereum's programmable money feature.
Step 2: Avoid manual or external triggers
Manual sending or external scripts do not leverage Ethereum's automatic, trustless execution.
Final Answer:
Write a payable function that checks if msg.value >= 2 Ether, then sends 1 Ether to the address using transfer() -> Option C