Last active
June 6, 2019 04:51
-
-
Save nickgrier07/3fbedec187e97678f4783d9a1bb428ba to your computer and use it in GitHub Desktop.
This file contains hidden or 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 return_prime(num): | |
| prime = "is prime." | |
| not_prime = "is not prime." | |
| divisors = 0 | |
| if num > 1: | |
| for i in range(2,num): | |
| if (num % i) == 0: | |
| divisors = divisors + 1 | |
| else: | |
| pass | |
| if divisors > 0: | |
| return not_prime | |
| else: | |
| return prime | |
| else: | |
| return not_prime | |
| def main(): | |
| five = return_prime(5) | |
| four = return_prime(4) | |
| print("Five ", five) | |
| print("Four ", four) | |
| if __name__ == '__main__': | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment