Challenge 2: Average of Values of Keys in a Dictionary

In this challenge, you are required to calculate the average of values in a dictionary.

Problem Statement

Implement a calculateAvg function that receives the ages dictionary as a ​parameter, and returns the average age of the students. Traverse all items in the dictionary using the “items” method above.


A dictionary


The average age of all students in the dictionary

Get hands-on with 1000+ tech skills courses.