Barclays Interview Question

Write a function for figuring out whether or not a number is prime.