• + 1 comment

    please tell me where I'm getting wrong . I'm getting one decimal after point and expected output is 2decimal after point if name == 'main': n = int(input()) student_marks = {} for _ in range(n): name, *line = input().split() scores = list(map(float, line)) student_marks[name] = scores query_name = input()

    temp = [] total = 0
    for key, value in student_marks.items(): if query_name == key: temp += student_marks.get(query_name)

    count = 0 for i in temp: count+=1 total += i avg = round(total/count, 3) print(avg)