Skip to content

Instantly share code, notes, and snippets.

@arlolra
Created December 10, 2010 02:42
Show Gist options
  • Save arlolra/735681 to your computer and use it in GitHub Desktop.
Save arlolra/735681 to your computer and use it in GitHub Desktop.
is prime?
#!/usr/bin/python
# is it prime?
# for mike
number = int(input("Enter an integer: "))
is_prime = True
for x in range(2, number):
if (number % x) == 0:
is_prime = False
print "Is your number prime?", is_prime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment