What is a function? A function is simply an activity, that is done to achieve particular outcome. For example, we can think baking a cake in oven as a function. By a mix of correct amount of butter, flour, sugar, vanilla, eggs and baking powder put in an oven at…