Broadridge interview question

Write code to identify whether number is prime or not?