Last active
November 14, 2018 14:14
-
-
Save irfantogluk/8a27b4f8af77fc7c7c0d2bd4f920585a to your computer and use it in GitHub Desktop.
İlk 9 basamağı girilen T.C. kimlik numarasının son iki basamağını bulan program kodudur. tc(123456789) şeklinde çalışır.
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
digits=lambda x:[int(d) for d in str(x)];on=lambda x:str(x)+str((((7*sum(digits(x)[:9][-1::-2]))-sum(digits(x)[:9][-2::-2]))%10));tc=lambda x:int(on(x)+str(sum(digits(on(x))[:10]) % 10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment