python is a good calculator

Problem 6
naive solution to problem 6

passes the 3 second rule, so screw it. Good enough