Lloyds Banking Group Interview Question

Write a function that returns sum