diff --git a/python/nixpkgs/soe/main.py b/python/nixpkgs/soe/main.py index 1c6c4a8..ba258ad 100644 --- a/python/nixpkgs/soe/main.py +++ b/python/nixpkgs/soe/main.py @@ -8,15 +8,7 @@ def sieve_of_eratosthenes(n): yield prime def main(): - num = 0 - another = True - while another: - try: - num = int(input("Primes up to: ")) - another = False - except ValueError: - pass - + num = int(input("Primes up to: ")) print() for i in sieve_of_eratosthenes(num): print(i)