Skip to content

Commit 2cb0c2d

Browse files
committed
PEP-8 import conventions
1 parent 7f39fe4 commit 2cb0c2d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

check_prime.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# Author: Tan Duc Mai
2-
1+
# Author: Tan Duc Mai
2+
3+
# Description: Three different functions to check whether a given number is a prime.
4+
# Return True if it is a prime, False otherwise.
5+
# Those three functions, from a to c, decreases in efficiency
6+
# (takes longer time).
37

4-
"""
5-
Three different functions to check whether a given number is a prime.
6-
Return True if it is a prime, False otherwise.
7-
Those three functions, from a to c, decreases in efficiency (takes longer time).
8-
"""
8+
from math import sqrt
99

1010

1111
def is_prime_a(n):
12-
from math import sqrt
1312
if n < 2:
1413
return False
1514
sqrt_n = int(sqrt(n))

0 commit comments

Comments
 (0)