Last active
May 28, 2018 06:36
-
-
Save DorukUlucay/3656c1c2e493f7ebe27b4d9cc1e181dd to your computer and use it in GitHub Desktop.
Python For-Else
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
# https://pyfiddle.io/fiddle/f479b511-7645-4a66-a434-be7a829f015d/?i=true | |
def isPrime(n): | |
for i in range(2,n): | |
if(n % i == 0): | |
print("asal degil") | |
break | |
else: | |
print("asal") | |
isPrime(9) # asal degil | |
isPrime(11) # asal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment