Fast Enterprises Interview Question

Write a method that checks whether a number is prime.