hard coded python solution to problem 5