Skip to content

Instantly share code, notes, and snippets.

@Bablzz
Last active Oct 23, 2019
Embed
What would you like to do?
Check if digit is simple
def is_simple(digit):
for i in range(2, digit - 1):
if ((digit % i) == 0):
return False
else:
return True
print(is_simple(72)) # False
print(is_simple(73)) # True
print(is_simple(71)) # True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment