Modify the student_grade function using the format method, so that it returns the phrase "X received Y% on the exam". For example, student_grade("Reed", 80)
should return "Reed received 80% on the exam".
I solve this code just like this and I got the result but Coursera shows that is wrong answer why?
def student_grade(name, grade):
print("{name} received {grade}% on the exam".format(name=name,grade=grade))
return ""
Here is your output: Reed received 80% on the exam
Paige received 92% on the exam
Jesse received 85% on the exam
Not quite. Check that you're filling in the contents of the
student_grade
function as requested.