Skip to content

Instantly share code, notes, and snippets.

@amka
Created April 1, 2016 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amka/ee575dd700b13c37abd045eb175d98f3 to your computer and use it in GitHub Desktop.
Save amka/ee575dd700b13c37abd045eb175d98f3 to your computer and use it in GitHub Desktop.
Hackerrank namedtuple challenge
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