-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIcIceSozlukPersonelMaasOrnegi.py
More file actions
37 lines (32 loc) · 1.31 KB
/
IcIceSozlukPersonelMaasOrnegi.py
File metadata and controls
37 lines (32 loc) · 1.31 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
personel = dict()
per_say = int(input("Kaç adet personel bilgisi gireceksiniz ? "))
id = 100
for i in range(1,per_say+1):
bilgi = dict()
adsoyad = input("{}. Personel Ad-Soyad : ".format(i))
bilgi["AdSoyad"] = adsoyad
maas = int(input("{}. Personel Maaş : ".format(i)))
bilgi["Maaş"] = maas
cs = int(input("{}. Personel Çocuk Sayısı : ".format(i)))
bilgi["CS"] = cs
ezam = int(input("{}. Personel Eski Zam : ".format(i)))
bilgi["Ezam"] = ezam
personel[id+i] = bilgi
print("--------------------------------------")
print(personel)
print("--------------------------------------")
# PERSONEL LİSTELE
for per_id in personel.keys():
print(" PER ID : {}\n".format(per_id),end = " ")
for per_bilgi in personel[per_id].keys():
print("{} : {}\n".format(per_bilgi,personel[per_id][per_bilgi]),end = " ")
print()
# ESKİ ZAM ORANLARI BUL
for per_id in personel.keys():
assert personel[per_id]["Maaş"] >= 0, "Maaş negatif bir değer olamaz"
ezam_oran = personel[per_id]["Ezam"] / personel[per_id]["Maaş"]
print("Per_ID : {} , Per_EzamOran : {:.2f}".format(per_id,ezam_oran))
# ARA
ara_per_id = int(input("Aranacak Personel ID giriniz : "))
bilgi = personel.get(ara_per_id,"Böyle bir personel bulunmamaktadır.")
print(bilgi)