num_theory.is_prime =================== .. py:module:: num_theory.is_prime Functions --------- .. autoapisummary:: num_theory.is_prime.is_prime Module Contents --------------- .. py:function:: is_prime(n) Check if a number is prime. :param n: The number to check for primality. Must be a positive integer greater than 1. :type n: int :returns: Returns True if the number is prime, otherwise False. :rtype: bool :raises ValueError: If the input is not a positive integer greater than 1. .. rubric:: Examples >>> is_prime(2) True >>> is_prime(4) False >>> is_prime(13) True