Skip to content

Instantly share code, notes, and snippets.

@rjshekar90
Created February 23, 2017 06:39
Show Gist options
  • Save rjshekar90/3ef2d452d89a245ea6abba9a88fa2d2c to your computer and use it in GitHub Desktop.
Save rjshekar90/3ef2d452d89a245ea6abba9a88fa2d2c to your computer and use it in GitHub Desktop.
#Hackerrank ------ Finding the percentage
if __name__ == '__main__':
n = int(raw_input())
student_marks = {}
for _ in range(n):
line = raw_input().split()
name, scores = line[0], line[1:]
scores = map(float, scores)
student_marks[name] = float(sum(scores)/len(scores))
query_name = raw_input()
print ("%0.2f"%student_marks[query_name])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment