Created
August 30, 2017 11:26
-
-
Save ozknozsrt/fbd7316066203d9f26800b4672c8883c to your computer and use it in GitHub Desktop.
python sayının okunuşu
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
birler = ["","Bir","İki","Üç","Dört","Beş","Altı","Yedi","Sekiz","Dokuz"] | |
onlar = ["","On","Yirmi","Otuz","Kırk","Elli","Altmış","Yetmiş","Seksen","Doksan"] | |
def okunus(sayı): | |
birinci = sayı % 10 | |
ikinci = sayı // 10 | |
return onlar[ikinci] + " " + birler[birinci] | |
sayı = int(input("Sayı:")) | |
print(okunus(sayı)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
daha gelişmiş hali yani yüzler, binler, yüzbinler hali var mı?