Created
April 1, 2016 09:26
-
-
Save amka/ee575dd700b13c37abd045eb175d98f3 to your computer and use it in GitHub Desktop.
Hackerrank namedtuple challenge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import namedtuple | |
n = input() | |
Mark = namedtuple('Mark', raw_input().strip()) | |
print round(sum([float(m.MARKS) for m in [Mark(*map(lambda x: x.strip(), raw_input().strip().split())) for i in xrange(n)]]) / n, 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment