Recall & Review
beginner
What is a return value in a blockchain smart contract function?
A return value is the data that a smart contract function sends back after it finishes running. It tells you the result of the function's work.
Click to reveal answer
beginner
Why are return values important in blockchain programming?
Return values let other parts of the program or users know what happened inside the contract, like if a transaction succeeded or what data was found.Click to reveal answer
intermediate
Can a blockchain smart contract function return multiple values?
Yes, some blockchain languages like Solidity allow functions to return multiple values using tuples or structs.
Click to reveal answer
beginner
What happens if a smart contract function does not have a return statement?
If a function does not return anything, it means it only changes the contract's state or performs actions without sending back data.
Click to reveal answer
intermediate
How do return values affect gas costs in blockchain transactions?
Returning data can increase gas costs because the blockchain stores or sends the returned data, so simpler return values can save gas.
Click to reveal answer
What does a return value from a smart contract function represent?
✗ Incorrect
A return value is the output data that a function sends back after execution.
Can a smart contract function return more than one value?
✗ Incorrect
Functions can return multiple values using tuples or structs in languages like Solidity.
What happens if a function has no return statement?
✗ Incorrect
Functions without return statements perform actions but do not send back data.
How do return values affect gas costs?
✗ Incorrect
Returning data can increase gas costs because the blockchain processes and stores the returned data.
Which of these is a reason to use return values in smart contracts?
✗ Incorrect
Return values provide information about what the function did or found.
Explain what a return value is in a blockchain smart contract and why it matters.
Think about how a function tells you what it did.
You got /3 concepts.
Describe how returning multiple values from a smart contract function works and when you might use it.
Consider a function that needs to send back more than one piece of information.
You got /3 concepts.