Broadridge Interview Question

Write code to identify whether number is prime or not?