mirror of
https://github.com/flancian/garden.git
synced 2026-08-07 23:16:21 +00:00
autopushed
This commit is contained in:
+2
-3
@@ -18,8 +18,7 @@ def factor(n):
|
|||||||
|
|
||||||
def echo_sieve(sieve):
|
def echo_sieve(sieve):
|
||||||
for n, prime in enumerate(sieve):
|
for n, prime in enumerate(sieve):
|
||||||
if i >= 2 and prime:
|
if n >= 2 and prime:
|
||||||
if prime:
|
|
||||||
click.echo(f"[[{n}]] is prime.")
|
click.echo(f"[[{n}]] is prime.")
|
||||||
|
|
||||||
def is_prime(n):
|
def is_prime(n):
|
||||||
@@ -46,7 +45,7 @@ def is_prime(n):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
continue
|
continue
|
||||||
echo_sieve(sieve)
|
echo_sieve(sieve)
|
||||||
return sieve[n]
|
return n >= 2 and sieve[n]
|
||||||
|
|
||||||
class AgoraCmd(click.Command):
|
class AgoraCmd(click.Command):
|
||||||
def format_help(self, ctx, formatter):
|
def format_help(self, ctx, formatter):
|
||||||
|
|||||||
Reference in New Issue
Block a user