problems 8 - 10

I should make an is_prime? function to reuse