Created directories for the chapters
This commit is contained in:
15
kapitel7/sidan_116_ex1.py
Normal file
15
kapitel7/sidan_116_ex1.py
Normal file
@@ -0,0 +1,15 @@
|
||||
konton = {"Kalle": 300, "Joakim": 1800, "Lisa": 900}
|
||||
|
||||
hogst = 0
|
||||
rikast = str()
|
||||
|
||||
for i, j in konton.items():
|
||||
print(i, j)
|
||||
if (hogst == 0):
|
||||
hogst = j
|
||||
rikast = i
|
||||
if (j > hogst):
|
||||
hogst = j
|
||||
rikast = i
|
||||
|
||||
print (rikast, "är rikast!")
|
Reference in New Issue
Block a user