Skip to content

Instantly share code, notes, and snippets.

@r14152
Created August 15, 2021 14:46
Show Gist options
  • Save r14152/90b5d511c50fae64776b7b100b95486f to your computer and use it in GitHub Desktop.
Save r14152/90b5d511c50fae64776b7b100b95486f to your computer and use it in GitHub Desktop.
Finding the percentage
if __name__ == '__main__':
n = int(input())
student_marks = {}
for _ in range(n):
name, *line = input().split()
scores = list(map(float, line))
student_marks[name] = scores
query_name = input()
print("{0:.2f}".format(sum(student_marks[query_name])/len(student_marks[query_name])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment