問題文です。
A computer programming professor gives out final grades on the scale of that are graded on the scale 90-100-A, 80-89-B, 70-79-C, 60-69-C-, 50-59-D, 0-49-F. Write a program that accepts numeric grade as an input from the user. Pass the grade as a parameter to a function and use a decision structure to calculate the corresponding letter grade. Return the letter grade from the function and display the result. An example is shown below:
自分のコードです。
def main():
def converter(score):
s = eval(input("Enter student score (0-100):"))
if s >= 90:
return "A"
elif s >= 80:
return "B"
elif s >= 70:
return "C"
elif s >= 60:
return "C-"
elif s >= 50:
return "D"
else:
return "F"
print("Grade is", score)
main()
なぜエラーが出るのか、問題文のReturn the letter grade from the function and display the resultの意味がわからないです。よろしくお願いします。