This is to demonstrate how “dictionary” is used in Python. Name:Value – pairs.
d={'m1':80,'m2':86,'m3':87,'m4':90,'m5':95}
sum=d['m1']+d['m2']+d['m3']+d['m4']+d['m5']
print('The sum of the dictionary values',d,' are ',sum)
To develop from within
This is to demonstrate how “dictionary” is used in Python. Name:Value – pairs.
d={'m1':80,'m2':86,'m3':87,'m4':90,'m5':95}
sum=d['m1']+d['m2']+d['m3']+d['m4']+d['m5']
print('The sum of the dictionary values',d,' are ',sum)