A function ends at return
Predict the output · Basic · §8.2 Giving back
Predict the output without running the code.
Code
def grade(score):
if score >= 90:
return "A"
if score >= 80:
return "B"
return "C"
print(grade(95), grade(80), grade(79))Solve this problem in your browser
Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.