You are viewing a single comment's thread. Return to all comments →
from collections import namedtuple
if name == 'main':
N = int(input()) headers = input().split() Student = namedtuple('Student', headers) total_marks = 0 for i in range(N): student_data = input().split() student = Student(*student_data) total_marks += int(student.MARKS) average = total_marks / N print(f"{average:.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 →
from collections import namedtuple
if name == 'main':