7/9 Student Becomes The Teacher


#1

hey guys I have a problem with this one. For some reason the error is that get_letter_grade is missing. Here is the code:

def get_letter_grade(score):
if score >=90:
return "A"
elif score >= 80:
return "B"
elif score >= 70:
return "C"
elif score >= 60:
return "D"
else:
return "F"
get_letter_grade(score)
print get_letter_grade(get_average(lloyd))


#2

Perhaps your code crashes before it has created that name.
So look for error messages from Python and go from there.

If there are no crashes from Python, then you can try printing out the name that codecademy says is missing. (You'd be printing a function which won't give you super-meaningful output, but it'll tell you if there's a function there or the name is missing entirely (if missing you'll get an error for trying to print something that isn't there))


#3

Python uses white space. Indentation matters. The instructions to the function must be indented below def get_letter_grade:.There is no need to type get_letter_grade(score) before you print get_letter_grade. It looks like you are trying to define another function called get_letter_grade(line 12). Also, look at how a function argument works. It looks like you are trying to call another function as your function argument which is unnecessary.