Assignment 7
Follow the following steps:
- Write a smart contract that declares a contract variable of type string named greeter. Assign a value to it (e. g. “Hello World!”).
- Write a function that has a state mutability of view that returns the value of the variable greeter.
- Write another function that is not declared view that returns this value.
- Write a function that takes the parameters uint256 _a and uint256 _b and returns the sum of both. What would be the correct state mutability declaration?
- Write a function like above without the proper state mutability declaration.
- Try your functions out.