def get_average_age(ages):
    """
    Get the average age from a dictionary of age counts.

    Args:
        ages (dict): dictionary of age counts

    Return:
        float: The average age given the age count.
    """
    average_age = 0
    total_population = sum(ages.values())
    for a in ages:
        average_age += ages[a] * a
    average_age = average_age/total_population
    return average_age