forked from Pandabearingstreet/bonus01
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprime.py
37 lines (26 loc) · 930 Bytes
/
prime.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import math
def is_prime(number):
"""Returns if number is a prime or not.
Args:
number (int): The number to be testet
Returns:
bool: The return value. True if number is prime, False otherwise.
"""
# your code goes here. You need to delete the line below this one.
raise NotImplementedError
def find_prime(n):
"""Returns the nth prime number.
The first prime number is 2, so find_prime(1) is supposed to return two,
and so on for other numbers.
Args:
n (int): The number of the prime number
Returns:
int: The prime number
"""
assert n < 10000000, "That would run an awfully long time!"
# your code goes here. You need to delete the line below this one.
raise NotImplementedError
if __name__ == "__main__":
# if you want to do additional testing, you can do so here. Everything here
# will not be run by pytest.
pass