Solved Problem 2 Implement The Following Function

Solved Problem 2 Implement The Following Function