Skip to content

Commit

Permalink
PEP-8 import conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
duke-mai committed Oct 1, 2021
1 parent 7f39fe4 commit 2cb0c2d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions check_prime.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Author: Tan Duc Mai
# Email: [email protected]
# Author: Tan Duc Mai
# Email: [email protected]
# Description: Three different functions to check whether a given number is a prime.
# Return True if it is a prime, False otherwise.
# Those three functions, from a to c, decreases in efficiency
# (takes longer time).

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


def is_prime_a(n):
from math import sqrt
if n < 2:
return False
sqrt_n = int(sqrt(n))
Expand Down

0 comments on commit 2cb0c2d

Please sign in to comment.