Created
August 4, 2016 19:07
-
-
Save kevin-weitgenant/5cc31eeb5a9264da807a1c980a318d29 to your computer and use it in GitHub Desktop.
practicepython.org Exercise 11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def prime_or_not(number): | |
z = 0 | |
for x in range(number): | |
x += 1 | |
if number % x == 0: | |
z += 1 | |
return z | |
a = int(input("Pass a number to verify if is prime:")) | |
if prime_or_not(a) > 2: | |
print("Isn't prime!") | |
else: | |
print("Is prime!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment