Sum of values in dict,,,,,, DS301222

dict={‘maths’:45,‘science’:55,‘english’:67,‘physical edu’:78}
print(sum(dict.values()))

or

dict={‘maths’:45,‘science’:55,‘english’:67,‘physical edu’:78}

total = 0
for i in dict.values():
total += i
print(total)

3 Likes

Good . Keep this up @DEVANSHUBISHT66

@DEVANSHUBISHT66

Correct , keep it up.

Keep it up​:innocent::innocent: @DEVANSHUBISHT66