An ordered set of instructions. It reads input, follows rules, and produces output.
Loading...
Loading...
Workspace
smart contracts Ethereum security and blockchain applications
Definition first
Solidity is a programming language for writing exact instructions, often used for smart contracts Ethereum security and blockchain applications. Start with one mental model: input goes through steps and becomes output.
Contract.solRun solc Contract.solHabit Think about state changes permissions and gas before writing codeAn ordered set of instructions. It reads input, follows rules, and produces output.
A value is data. A variable is the name you use to hold and reuse that data.
A named piece of work. It takes input, does one job, and can return a result.
Solidity compiler is the place that actually runs code from Contract.sol.
First readable code
uint256 public total = 42;
Output 42Language lineage
See where Solidity comes from, which languages feel close, and what to learn next.
smart contracts, blockchain state, and security sensitive transactions
Zero base path
Question bank
Pick a stage or search across the open programming bank. Jump straight to the matching drill.
Solidity question 1. Choose the statement that matches printing a value.
Solidity question 2. Choose the statement that matches naming a value.
Solidity question 3. Choose the statement that matches reusable function.
Solidity question 4. Choose the statement that matches basic collection.
Solidity question 5. Choose the statement that matches printing a value.
Solidity question 6. Choose the statement that matches naming a value.
Solidity question 7. Choose the statement that matches reusable function.
Solidity question 8. Choose the statement that matches basic collection.
Solidity question 9. Choose the statement that matches printing a value.
Solidity question 10. Choose the statement that matches naming a value.
Solidity question 11. Choose the statement that matches reusable function.
Solidity question 12. Choose the statement that matches basic collection.
Solidity question 13. Choose the statement that matches printing a value.
Solidity question 14. Choose the statement that matches naming a value.
Solidity question 15. Choose the statement that matches reusable function.
Solidity question 16. Choose the statement that matches basic collection.
Solidity question 17. Choose the statement that matches printing a value.
Solidity question 18. Choose the statement that matches naming a value.
Multiple choice
Solidity question 1. Choose the statement that matches printing a value.
uint256 public total = 42;
Reference
solc Contract.solentry point output syntax uint256
uint256 public total = 42;
variables assignment types uint256
uint256 total = 42;
function collection Array
function add(uint256 a, uint256 b) public pure returns (uint256) {
return a + b;
}
uint256[] public scores;
scores.push(42);