mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-25 01:04:03 +08:00
Modernize Python 2 code to get ready for Python 3
This commit is contained in:
@ -2,6 +2,9 @@
|
||||
-The sieve of Eratosthenes is an algorithm used to find prime numbers, less than or equal to a given value.
|
||||
-Illustration: https://upload.wikimedia.org/wikipedia/commons/b/b9/Sieve_of_Eratosthenes_animation.gif
|
||||
'''
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
from math import sqrt
|
||||
def SOE(n):
|
||||
check = round(sqrt(n)) #Need not check for multiples past the square root of n
|
||||
|
Reference in New Issue
Block a user