In this exercise, I did my code differently by just checking if the gpa and returning the grade.
But when I saw how system did it, i was confused. Why did it use "grade = “F” for? and can you also explain at then end what is return grade doing?
def grade_converter(gpa): grade = "F" if gpa >= 4.0: grade = "A" elif gpa >= 3.0: grade = "B" elif gpa >= 2.0: grade = "C" elif gpa >= 1.0: grade = "D" return grade print(grade_converter(3.7))