Created
November 7, 2011 09:53
-
-
Save yoavram/1344581 to your computer and use it in GitHub Desktop.
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 smallest_divisor(n): | |
div=2 | |
while n%div!=0: | |
div = div+1 | |
return div | |
print "Smallest divisor of",2011,"is",smallest_divisor(2011) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment