You are viewing a single comment's thread. Return to all comments →
Tried this approach as I'm in learning phase
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() student_average={} for name in student_marks: avg=0 for j in range(3): avg = student_marks[name][j]+avg student_average[name]=format((avg/3), ".2f") print(student_average[query_name])
Seems like cookies are disabled on this browser, please enable them to open this website
Finding the percentage
You are viewing a single comment's thread. Return to all comments →
Tried this approach as I'm in learning phase