Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
__mod__ solution in Clear category for Restricted Prime by sqeph
def checkio(number):
one, zero = int(True), int(False) # Get around the fact we can't use digits
i = one + one # We want to start at 'two'
while i < number:
if number.__mod__(i) == zero:
return False
i += one # Add 'one'
return True
June 19, 2014
Comments: