Created
May 12, 2017 16:44
-
-
Save odanga94/611f43a81c0fbe9caf86789d024adb18 to your computer and use it in GitHub Desktop.
PracticePython/Exercise11.py
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 is_prime(): | |
num = int(input("Enter the number you wanna check:")) | |
divisor = 2 | |
while num != divisor: | |
if num == 1: | |
print(False) | |
break | |
elif num % divisor == 0: | |
print(False) | |
break | |
divisor += 1 | |
else: | |
print(True) | |
is_prime() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment