We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Collections.namedtuple()
Collections.namedtuple()
Sort by
recency
|
983 Discussions
|
Please Login in order to post a comment
from collections import namedtuple inp, col=int(input()), namedtuple('Student', input().split()) li=[int(col(*input().split()).MARKS) for _ in range(inp)] print(f'{round(sum(li)/ inp, 2):.2f}')
from collections import namedtuple
marks_sum, n, Student = 0, int(input()), namedtuple('Student', input().split()) print("{0:.2f}".format(sum([int(Student(*input().split()).MARKS) for _ in range(n)]) / n))