maths.next_prime_number ======================= .. py:module:: maths.next_prime_number .. autoapi-nested-parse:: Next Prime Number -- https://en.wikipedia.org/wiki/Prime_number In the ancient city of Numeria, legends speak of an oracle whose whispers could bend the very fabric of mathematics. Travelers from distant lands would bring her a number, and in return, she would reveal its future: the very next prime number. Your task is to embody the oracle's wisdom. You will be given a number. You must find the smallest prime number that is strictly greater than it. Attributes ---------- .. autoapisummary:: maths.next_prime_number.n Functions --------- .. autoapisummary:: maths.next_prime_number.is_prime maths.next_prime_number.next_prime Module Contents --------------- .. py:function:: is_prime(number: int) -> bool Check if a number is prime. >>> is_prime(2) True >>> is_prime(15) False >>> is_prime(19) True >>> is_prime(1) False >>> is_prime(-7) False .. py:function:: next_prime(number: int) -> int Find the smallest prime number strictly greater than the given number. >>> next_prime(2) 3 >>> next_prime(7) 11 >>> next_prime(14) 17 >>> next_prime(0) 2 >>> next_prime(-10) 2 .. py:data:: n