Added NthPrime() function and solved Problem 7.