So this code has some unecessary parts of it and can be reduced to just return the values of the compute_grade instead of saving it in a variable grade and just return it. def compute_grade(average_marks): if average_marks >=80.0: return 'A' ...
So it gets the value from compute_grade function. That's it
Which grade are you referring to, the one inside the function definition, or the one at the bottom with compute_grade?
Understand now… Thank you
The one at the bottom with compute_grade, can declare any variable we want
Обсуждают сегодня