Skip to content

Commit 946be2e

Browse files
authored
Add files via upload
1 parent d4b06fb commit 946be2e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Find_the_percentage.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
if __name__ == '__main__':
2+
n = int(raw_input())
3+
student_marks = {}
4+
for _ in range(n):
5+
line = raw_input().split()
6+
name, scores = line[0], line[1:]
7+
scores = map(float, scores)
8+
student_marks[name] = scores
9+
query_name = raw_input()
10+
k=0
11+
for i in student_marks:
12+
if i==query_name:
13+
for j in student_marks[i]:
14+
k=k+j
15+
print("{:.2f}".format(k/len(student_marks[query_name])))

0 commit comments

Comments
 (0)