Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
pragma solidity ^0.8.0;
contract AddProgram {
uint public a = 5;
uint public b = 3;
uint public sum;
function calculate() public {
sum = a + b;
}
}Coding works best on desktop or with an external keyboard.
pragma solidity ^0.8.0;
contract AddProgram {
uint public a = 5;
uint public b = 3;
uint public sum;
function calculate() public {
sum = a + b;
}
}Coding works best on desktop or with an external keyboard.
Adds two numbers and stores the result in a state variable.
pragma solidity ^0.8.0;
contract AddProgram {
uint public a = 5;
uint public b = 3;
uint public sum;
function calculate() public {
sum = a + b;
}
}Solidity is a statically typed, contract-oriented programming language designed for building smart contracts on the Ethereum blockchain. It enables developers to write decentralized applications (dApps), manage digital assets, and automate trustless logic using a syntax inspired by JavaScript, C++, and Python.
Origin & Creator
Solidity was created by Gavin Wood and the Ethereum Foundation in 2014 to serve as the primary language for writing smart contracts on the Ethereum blockchain.
Industrial Note
Solidity is heavily used in decentralized finance (DeFi), NFT marketplaces, blockchain gaming, DAOs, tokenization engines, supply chain tracking, on-chain governance, and enterprise blockchain automation.