questions1&2

worked on the function