Skip to content

Instantly share code, notes, and snippets.

@burki169
Last active June 18, 2017 07:55
Show Gist options
  • Save burki169/3727d937c46991e58dcacfcf65ef3632 to your computer and use it in GitHub Desktop.
Save burki169/3727d937c46991e58dcacfcf65ef3632 to your computer and use it in GitHub Desktop.
def is_prime(number):
for i in range(2,number-1):
if number % i == 0:
return False
return True
user_number = int(input("Pick a number and I'll tell t-ya if it's a prime :"))
if is_prime(user_number):
print("That's it you got a prime, optimus?")
else:
print("Better luck next time")
print("End of game")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment