def METHOD_NAME(categories, user_score_mapping):
    """
    Calculates average score for each category and appends it.
    """
    for category in categories:
        category_scores = user_score_mapping[category['name']]
        sum_score = sum(category_scores, 0.0)
        average_score = round(sum_score / len(category_scores), 1)
        category['edx_average_score'] = average_score