How's everybody doing?


File "python", line 45
students = [lloyd, alice, tyler]
SyntaxError: invalid syntax

why is this a syntax error? it worked earlier in the exercise and now suddenly it is a syntax error

students=[lloyd, alice, tyler]


could be on the line above? Please post your full code


lloyd = {
    "name": "Lloyd",
    "homework": [90.0, 97.0, 75.0, 92.0],
    "quizzes": [88.0, 40.0, 94.0],
    "tests": [75.0, 90.0]
alice = {
    "name": "Alice",
    "homework": [100.0, 92.0, 98.0, 100.0],
    "quizzes": [82.0, 83.0, 91.0],
    "tests": [89.0, 97.0]
tyler = {
    "name": "Tyler",
    "homework": [0.0, 87.0, 75.0, 22.0],
    "quizzes": [0.0, 75.0, 78.0],
    "tests": [100.0, 100.0]

# Add your function below!
def average(numbers):
    return total/len(numbers)
def get_average(student):
    return homework*0.1+quizzes*0.3+tests*0.6
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"
        return "F"

print get_letter_grade(get_average(lloyd)

students=[lloyd, alice, tyler]

def get_class_average(students):
    for student in students:
    return average(results)

print get_class_average(students)
print get_letter_grade(get_class_average(students))


like i said, the problem is actually in the line above. Look at your parentheses


is there another way to post my code other than copy/paste so the formatting is preserved?


Did you see my reply about the suggested fix?

you could put it on or you could just simply use mark up:

To keep the formatting intact


ok great that worked. so my follow-up question is how could i have known it was a problem on the line above? because it told me the problem was on this line. thats why i didnt check above.


Because i am good :innocent:

Just kidding, because i know the once you start using parentheses you can put code over multiply lines:

print get_letter_grade(

because this is valid (valid and recommend are two different things), but because you forgot ), python thought you still where busy with calling get_letter_grade.


understood, :+1:thanks