You are viewing a single comment's thread. Return to all comments →
from collections import namedtuple N=int(input()) sum_marks=0 Student=namedtuple('Student',input().split()) for i in range(N): row=input().split() xyz=Student(*row) sum_marks+=int(xyz.MARKS) print("{:.2f}".format((sum_marks/N))) # print(f'{(sum_marks/N):.2f}')
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 →