mirror of
https://github.com/flancian/garden.git
synced 2026-08-07 23:16:21 +00:00
autopushed
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ def prime(n):
|
|||||||
"""Simple program that factors a number using a [[Sieve of Eratosthenes]]."""
|
"""Simple program that factors a number using a [[Sieve of Eratosthenes]]."""
|
||||||
p, sieve = is_prime(n)
|
p, sieve = is_prime(n)
|
||||||
if p:
|
if p:
|
||||||
click.echo(f"[[{n}]] is prime.")
|
click.echo(f"*{n}* is prime.")
|
||||||
else:
|
else:
|
||||||
click.echo(f"{n} is not prime. Want proof? :)")
|
click.echo(f"{n} is not prime. Want proof? :)")
|
||||||
click.echo("\n".join([line for line in PROOF if f'[[{n}]]' in line]))
|
click.echo("\n".join([line for line in PROOF if f'[[{n}]]' in line]))
|
||||||
|
|||||||
Reference in New Issue
Block a user