Mid2 24th_Find_Min_&_Max
d1={1:200,2:3000,3:100,5:20}
largest=d1[1]
smallest=d1[1]
for key in d1:
if smallest>d1[key]:
smallest=d1[key]
print(smallest)
for key in d1:
if largest<d1[key]:
largest=d1[key]
print(largest)
#output:
20
3000
Comments
Post a Comment