Barclays interview question

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