Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Jobthomas10 authored Dec 15, 2024
1 parent e5c681d commit 3887582
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Day-15/job..py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
alice =int(input("enter mark of alice:"))
jack=int(input("enter mark of jack: "))
sid=int(input("enter mark of sid: "))
student_score=({"alice":alice, "jack":jack,"sid":sid})
def average(i):
total=sum(i.values())
count=len(i)
avg=total/count
return avg
print("Average score:",average(student_score))
def find_highest_score(scores):
highest_student= None
highest_score=0
for student,score in scores.items():
if score> highest_score:
highest_score=score
highest_student=student
return highest_student,highest_score
highest_student,highest_score=find_highest_score(student_score)
print(f"Highest score:{highest_student} with {highest_score}")

0 comments on commit 3887582

Please sign in to comment.