Collections.namedtuple()

  • + 0 comments
    from collections import namedtuple
    
    N = int(input())
    
    StudentMarks = namedtuple('StudentMarks',input().split())
    
    Marks_list = []
    
    for i in range(N):
        a,b,c,d = input().split()
        S = StudentMarks(a,b,c,d)
        Marks_list.append(int(S.MARKS))
    
    print(round(sum(Marks_list)/len(Marks_list),2))