Skip to content

Instantly share code, notes, and snippets.

@kevin-weitgenant
Created August 4, 2016 19:07
Show Gist options
  • Save kevin-weitgenant/5cc31eeb5a9264da807a1c980a318d29 to your computer and use it in GitHub Desktop.
Save kevin-weitgenant/5cc31eeb5a9264da807a1c980a318d29 to your computer and use it in GitHub Desktop.
practicepython.org Exercise 11
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