Sending a Letter


#1



https://www.codecademy.com/courses/python-beginner-en-qzsCL/1/3?curriculum_id=4f89dab3d788890003000096


Oops, try again. Your code looks a bit off, see the console window for the error message!


Replace this line with your 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"


#2

Your code layout looks like everything is nested further in, which is not the case at all.

if

elif

elif

elif

else

It is all one long statement. Only the return statements need nesting. There may well be an exception raised, indentationError.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.