To check a number is prime or not

Can you please write
Code