Your question is Prime Number Function. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
WebMD Medscape content tooling uses numeric revision tokens that may need prime-number validation before processing. Write a function that determines whether a given integer is prime.
A prime number is an integer greater than 1 with exactly two positive divisors: 1 and itself. Return True when n is prime and False otherwise. Your solution should avoid testing every integer up to n when a smaller search is sufficient.
n.n is prime.def is_prime(n):