Skip to content

Instantly share code, notes, and snippets.

@odanga94
Created May 12, 2017 16:44
Show Gist options
  • Save odanga94/611f43a81c0fbe9caf86789d024adb18 to your computer and use it in GitHub Desktop.
Save odanga94/611f43a81c0fbe9caf86789d024adb18 to your computer and use it in GitHub Desktop.
PracticePython/Exercise11.py
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