mirror of
https://github.com/flancian/garden.git
synced 2026-08-06 14:36:18 +00:00
autopushed
This commit is contained in:
+2
-2
@@ -73,9 +73,9 @@ def prime(n):
|
||||
"""Simple program that factors a number using a [[Sieve of Eratosthenes]]."""
|
||||
p, sieve = is_prime(n)
|
||||
if p:
|
||||
click.echo(f"***{n}*** is ***prime***.")
|
||||
click.echo(f"**{n}** is **prime**.")
|
||||
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(f"Primes up to {n}: {print_sieve(sieve)}.")
|
||||
|
||||
Reference in New Issue
Block a user