Skip to content

Commit

Permalink
Merge pull request keshavsingh4522#50 from Rupali409/master
Browse files Browse the repository at this point in the history
created find the percentage.py
  • Loading branch information
keshavsingh4522 committed Oct 13, 2020
2 parents fe2d960 + 3e4ea9a commit 715e3c3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Python/find the percentage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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 = str(input())
if query_name in student_marks:
l=list(student_marks[query_name])
sum=0
for i in range(len(l)):
sum= l[i]+sum
print("{:.2f}".format(sum/3))

0 comments on commit 715e3c3

Please sign in to comment.