Collections.namedtuple()

  • + 0 comments
    N = int(input())
    header = input().split()
    index_number = header.index("MARKS")
    marks1 = []
    total = 0
    for i in range(N):
        header = input().split()
        marks1.append(int(header[index_number]))
    for i in range(len(marks1)):
        total = total+marks1[i]
    print(total/N)