Question d’entretien chez EarnUp

Write a function to detect whether a number is prime.