-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtelefon_rehberi.py
More file actions
59 lines (53 loc) · 1.12 KB
/
telefon_rehberi.py
File metadata and controls
59 lines (53 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import os
rehber ={
"Yasin":51653216,
"Nesli": 65622148
}
#Sozluge erisim icin:
#rehber["key"]
#rehber.get("key")
def ekle():
ad =input("isim")
tel =input("telefon")
rehber.update({ad:tel})
print(f"{ad} kisisi eklendi")
def ara():
ad =input("isim").lower()
for isim, tel in rehber.items():
if isim.lower() == ad:
print(tel)
return
else:
print(f"{ad} Isimli bir kullanici yok.")
def sil():
ad =input("isim")
if ad in rehber:
rehber.pop(ad)
print(f"{ad} Adli kisi rehberden silindi")
print(rehber)
else:
print("Boyle bir Kullanici yok..")
def listele():
print("Isim - Telefon")
for x in rehber:
print(x,rehber.get(x))
print(len(rehber), "Kisi Listelendi.")
while True:
os.system("cls")
print("""
Telefon Rehberi
Ekle -1
Ara -2
Sil -3
Listele -4
""")
sec = input("Seciniz: ")
if sec == "1":
ekle()
elif sec=="2":
ara()
elif sec == "3":
sil()
elif sec== "4":
listele()
input("Devam etmek icin Enter")