# Prime Number Checker by Alex "Arrexel" Reid
print "Prime Number Checker"
primenum = float(raw_input("Enter the number to check: "))
if primenum % 2 == 0:
print int(primenum), "is not a prime number."
primeroot=int(primenum**.5)
divisor = 3
prime = True
for x in range(primeroot):
if primenum % divisor == 0:
print int(primenum), "is not a prime number."
prime = False
break
divisor += 2
if prime != False:
print int(primenum), "is a prime number."
Return to Interpreted Languages
Users browsing this forum: No registered users and 0 guests