From 7919ca323991467d2d9563816abdcd3d9dbd4e6b Mon Sep 17 00:00:00 2001 From: Theakers Date: Fri, 24 Sep 2021 23:19:37 +0200 Subject: [PATCH 1/3] 2.haftanin odevlerini icerir. --- cevaplar.py | 0 cevaplar2.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 cevaplar.py create mode 100644 cevaplar2.py diff --git a/cevaplar.py b/cevaplar.py new file mode 100644 index 0000000..e69de29 diff --git a/cevaplar2.py b/cevaplar2.py new file mode 100644 index 0000000..e69de29 From bd84176c7ba33e736ef5cccf30a1ec2a03add380 Mon Sep 17 00:00:00 2001 From: Theakers Date: Thu, 7 Oct 2021 00:48:31 +0200 Subject: [PATCH 2/3] New Week-2 --- contact_list.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 contact_list.py diff --git a/contact_list.py b/contact_list.py new file mode 100644 index 0000000..e69de29 From 55dac56ebd78dcc289221341016ef4bfa27197b6 Mon Sep 17 00:00:00 2001 From: Theakers Date: Thu, 7 Oct 2021 00:59:32 +0200 Subject: [PATCH 3/3] Week 2 New --- contact_list.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/contact_list.py b/contact_list.py index e69de29..b0b3774 100644 --- a/contact_list.py +++ b/contact_list.py @@ -0,0 +1,40 @@ +# dogru isim ve telefon numaralarini alip ekrana ayzdiran dictionary +dic = { }#bos bir dictionary ve liste olusturdum. +liste=[] + +while True : + + while True: # while True dongusu ile isimler alip eger isimler sadece hadrflerden olusuyorsa kabul eden aksi halde yeni isim isteyen dongu + name = input( "Enter name of friend :-") + if (name.isalpha())==False: #burda sadece harflerden olusup olusmadigini kontrol ettim + print("Please enter the correct name of friend") + else: + break + while True: #burda yine bir dongu ile uygun telefon numaralarini istedim. + phone =( input("Enter phone number of friend :-" )) + if len(phone)!=10: # burda istenen numaranin 10 haneden olusup olusmadigini kontrol ettim + print("Please enter the correct phone number") + else: + break + a=input("Is this person important for you: Y/N") #kisinin onmeli olup olmadigini sordum + if a=="Y": # eger onemli ise bunu bos listenin icine numara ve isim ile eklemesini istedim. + liste.append([name,phone]) + + tup=tuple(liste) # bu isimleri ise tuple icinde guvenli bolge olusturdum. boylece silinmeyecek ve degismeyecek + + dic [name] = phone #burda dictionary i olusturdum. + choise = input("Enter Q to quit otherwise N :-") #burda tekrar isim eklemek istemedigini sordum. Add bolumu + if choise == "Q" or choise == "q" : # hayir ise donguden cikacak + break +print(dic)# ekrana dictionary i yazdirdim +print(tup)#ekrana tuple i yazdirdim + +name=input("Please enter the name of friend you want to delete : ")# delete menusu istedigi ismi silecek. +del dic[name] +print(dic) + +name=input("Please enter the name of friend you want to edit or change number: ") #edit or change bolumu +phone=int(input("Enter the phone number of friend: ")) +del dic[name] +dic[name]=phone +print(dic) \ No newline at end of file