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
|
1054 Discussions
|
Please Login in order to post a comment
Write the code in 4 lines except for import and main statements.
n = int(input())
from collections import namedtuple students = namedtuple('students', input())
sum_notes = 0 for counter in range(n): x, y, z, w = input().split() st = students(x, y, z, w) sum_notes += int(st.MARKS)
avg_notes = (sum_notes/n) print(f"{avg_notes:.2f}")