fixed indentation typo
removed extra steps by increasing the iteration by 1
better variable naming
initial solution to problem 14 PE