Write an algorithm to determine if a number is prime.
Implement is_prime(n), which accepts an integer and returns True if it has exactly two positive divisors, and False otherwise. Return False for values less than 2. Use a function-based solution with no input parsing or output formatting.
def is_prime(n):