def get_average_grade(scores): # Validate that the list is not empty to #avoid division by zero error if not scores: return "F" # 1. Calculate the exact average average = sum(scores) / len(scores) # 2. Define the grading scale in an array #(list of tuples) from highest to lowest grade_scale = [ (97, "A+"), (93, "A"), (90, "A-"), (87, "B+"), (83, "B"), (80, "B-"), (77, "C+"), (73, "C"), (70, "C-"), (67, "D+"), (63, "D"), (60, "D-") ] # 3. Find the corresponding grade for min_score, letter_grade in grade_scale: if average >= min_score: return letter_grade return "F"