-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnot_dictionaryodev.py
More file actions
64 lines (44 loc) · 1.51 KB
/
Copy pathnot_dictionaryodev.py
File metadata and controls
64 lines (44 loc) · 1.51 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
60
61
62
ogrenciler = {}
for i in range(3): #for kullanarak da yapılabilir yani döngüyü üç kere yazmaya gerk yok.
number = input('Öğrenci Numarası: ')
name = input('Öğrencinin Adı: ')
surname = input('Öğrencinin Soyadı: ')
phone = input('Öğrenci Telefon Numarası: ')
# ogrenciler[number] = {
# 'adı':name, # ......... veya update methodu ile de kullanılabilir....
# 'soyadı':surname,
# 'telefon':phone
# }
ogrenciler.update({
number: {
'adı' : name,
'soyadı': surname,
'telefon': phone,
}
})
# number = input('Öğrenci Numarası: ')
# name = input('Öğrencinin Adı: ')
# surname = input('Öğrencinin Soyadı: ')
# phone = input('Öğrenci Telefon Numarası: ')
# ogrenciler.update({
# number: {
# 'adı' : name,
# 'soyadı': surname,
# 'telefon': phone,
# }
# })
# number = input('Öğrenci Numarası: ')
# name = input('Öğrencinin Adı: ')
# surname = input('Öğrencinin Soyadı: ')
# phone = input('Öğrenci Telefon Numarası: ')
# ogrenciler.update({
# number: {
# 'adı' : name,
# 'soyadı': surname,
# 'telefon': phone,
# }
# })
print('*'*50)
arananogrenci = input('öğrenci no: ')
ogrenci = ogrenciler[arananogrenci]
print(f"Aramış olduğunuz {ogrNo} nolu öğrencinin adı: {ogrenci['adı']} soyadı: {ogrenci['soyadı']} ve telefonu da: {ogrenci['telefon']}")