break_ex.py 199 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
#!/usr/bin/env python3

n = int(input("Please enter a positive integer: "))
for ii in range(2, n):
    if n % ii == 0:
        print(n, "is not prime.")
        break
else:
    print(n, "is prime.")