Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Girilen Bir Harfin Telefonda Karşılık Gelen Rakamı Yazan Kod #840

Open
wants to merge 1 commit into
base: 58.Fonksiyonel-Analiz
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions FonksiyonelAnaliz.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
harf = input("Harfi girin: ").lower()

eng_harfler = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
tr_karakter = ["ç", "ğ", "ı", "ö", "ş", "ü"]

if not harf in tr_karakter:
if harf in ["a", "b", "c"]:
deger = 2
elif harf in ["d", "e", "f"]:
deger = 3
elif harf in ["g", "h", "i"]:
deger = 4
elif harf in ["j", "k", "l"]:
deger = 5
elif harf in ["m", "n", "o"]:
deger = 6
elif harf in ["p", "r", "s"]:
deger = 7
elif harf in ["t", "u", "v"]:
deger = 8
elif harf in ["w", "x", "y", "z"]:
deger = 9
else:
print("Yanlış karakter girdiniz!..")

if harf in eng_harfler:
print(f"{harf.upper()} harfi telefonda {deger} rakamına karşılık gelir.")

else:
print("Lütfen Türkçe karakter girmeyin!")