You are viewing a single comment's thread. Return to all comments →
N=int(input()) from collections import namedtuple Sm=namedtuple('Sm',f"{input()}") i=[int(Sm(*input().split()).MARKS)for _ in range(N)] print(f'{sum(i)/N : .2f}')
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Collections.namedtuple()
You are viewing a single comment's thread. Return to all comments →
N=int(input()) from collections import namedtuple Sm=namedtuple('Sm',f"{input()}") i=[int(Sm(*input().split()).MARKS)for _ in range(N)] print(f'{sum(i)/N : .2f}')