-
Notifications
You must be signed in to change notification settings - Fork 0
/
top1.py
60 lines (52 loc) · 1.54 KB
/
top1.py
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
lugat = {
"Tesla": {
"a": ["Model 3", "5 497 500 P"],
"b": ["Model S", "7 900 000 P"],
"c": ["Model X", "7 600 000 P"]
},
"Lada": {
"d": ["Granta", "678 300 000 c"],
"e": ["Largus", "1 300 900 c"],
"f": ["Vesta", "1 121 900 c"]
},
"Daewoo": {
"g": ["Lacetty", "200 000 000 c"],
"h": ["Matiz", "60 000 000 c"],
"i": ["Tiko", "30 000 000 c"]
}
}
komp = input("Kompaniya nomini kiriting: ")
tanla = input('''Tesla
a: Model 3, 5 497 500 P
b: Model S, 7 900 000 P
c: Model X, 7 600 000 P
Lada
d: Granta, 678 300 000 c
e: Largus, 1 300 900 c
f: Vesta, 1 121 900 c
Daewoo
g: Lacetty, 200 000 000 c
h: Matiz, 60 000 000 c
i: Tiko, 30 000 000 c
Shulardan birini tanlang; ''')
if komp.lower() == "tesla":
if tanla.lower() == "a":
print(lugat["Tesla"]["a"])
elif tanla.lower() == "b":
print(lugat["Tesla"]["b"])
elif tanla.lower() == "c":
print(lugat["Tesla"]["c"])
elif komp.lower() == "lada":
if tanla.lower() == "d":
print(lugat["Lada"]["d"])
elif tanla.lower() == "e":
print(lugat["Lada"]["e"])
elif tanla.lower() == "f":
print(lugat["Lada"]["f"])
elif komp.lower() == "daewoo":
if tanla.lower() == "g":
print(lugat["Daewoo"]["g"])
elif tanla.lower() == "h":
print(lugat["Daewoo"]["h"])
elif tanla.lower() == "i":
print(lugat["Daewoo"]["i"])