Progr assignment 2

I didn’t really understand how to solve it…