Solution for Pro1.1 and Pro1.2 of Week1