Created
March 27, 2011 17:48
-
-
Save pasali/889407 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
#!/usr/bin/env python | |
#-*-coding:utf-8-*- | |
def kiyasLa(sayi_1, sayi_2): | |
''' | |
>>> kiyasLa(9, 4) | |
1 | |
>>> kiyasLa(6, 6) | |
0 | |
>>> kiyasLa(3, 13) | |
-1 | |
''' | |
if sayi_1 > sayi_2: | |
print "1" | |
elif sayi_1 == sayi_2: | |
print "0" | |
elif sayi_1 < sayi_2: | |
print "-1" | |
if __name__ == "__main__": | |
import doctest | |
doctest.testmod() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment