You are viewing a single comment's thread. Return to all comments →
from collections import namedtuple
n=int(input()) title=input().split() student=namedtuple('student',title) total=0 for _ in range(n): data=input().split() S=student(*data) total+=int(S.MARKS) print(total/n)
Seems like cookies are disabled on this browser, please enable them to open this website
Collections.namedtuple()
You are viewing a single comment's thread. Return to all comments →
from collections import namedtuple
n=int(input()) title=input().split() student=namedtuple('student',title) total=0 for _ in range(n): data=input().split() S=student(*data) total+=int(S.MARKS) print(total/n)