A fucntion is essentially a piece of code that take one more input in the form of parameter,process it and returns a value.