finished problem 6

learned that ^ is not a power operator