Lloyds Banking Group interview question

Write a function that returns sum