Solved Problem 2. Updated print for problem 1