0 out of 464 challenges solved
Write a function `is_prime(n: int) -> bool` that determines whether a given integer `n` is a prime number. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. #### Example Usage ```python [main.nopy] print(is_prime(2)) # True print(is_prime(4)) # False print(is_prime(13)) # True print(is_prime(1)) # False print(is_prime(-5)) # False ``` #### Constraints - The input will always be an integer. - The function should return `True` if the number is prime, otherwise `False`.
def is_prime(n: int) -> bool:
"""
Determine if the given integer is a prime number.
Args:
n (int): The number to check.
Returns:
bool: True if n is a prime number, False otherwise.
"""
# Implement the logic to check for prime numbers
pass