numbers question 2

function added to complete this question