Last active
October 23, 2019 11:24
-
-
Save Bablzz/288589c512e71452874d683b0824c83a to your computer and use it in GitHub Desktop.
Check if digit is simple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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