Modified the second exercise functions as tests failed

If a negative number was provided to the IsPrime() function it returned True