Complete the code to declare a smart contract named MyContract.
contract [1] {
// contract code here
}The contract name should start with a capital letter and match the declaration. 'MyContract' is the correct name.
Complete the code to define a public state variable named count of type uint.
uint public [1];The variable name should be 'count' as specified.
Fix the error in the function declaration to make it a public function named increment.
function [1]() public { count += 1; }
Function names are case-sensitive. 'increment' in lowercase is correct.
Fill both blanks to complete the function that returns the current count.
function [1]() public view returns ([2]) { return count; }
The function name should be 'getCount' and it returns a 'uint' type.
Fill both blanks to complete the constructor that sets count to zero.
constructor() {
count [1] [2];
}In modern Solidity, constructors do not use visibility modifiers. Set count to zero using '=' and '0'.