Added Python solutions to problems 17 and 18