Skip to content

Rohit-kumar-yadav/Solidity-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lab 1 Initialize State Variable

you have to create a public state variable num and initialized it with 10;

Lab 2 Get Local Variable

you have to create a local variable rollNumber and initialized it with 10 using a function getLocal() . This getLocal( ) also returns the value the local variable.

Lab 3 Creating Functions

you have to create a state variable and initialised it with 10 and then you have to create a function returnStateVariable( ) which returns the value of the created state variable . In the same way you have to create a local variable and initialised it with 20 and then you have to create a function returnLocalVariable( ) which returns the value of the created local variable.

Lab 4 Arguments In Function

  1. Create a state variable (need not to be public).
  2. Create a set() and with one argument. And set the value of the created state variable with the value passed as an argument to the set().
  3. Then create another function get() which returns the value of the state variable.

Lab 5 Require Statement

  1. Create a checkInput (uint input).
  2. Check whether the input is greater than equal to zero and less than equal to 255. If input is within range then return "Within Range" otherwise throw error "Not Within Range".

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published