Practice 2

Completed functions code