Its okay to be average


#1



I'm stuck at 'Its Okay to Be Average' because the terminal gives me the error message:
" File "python", line 20
def average(nun):
^
SyntaxError: invalid syntax


This is my 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]
  
    
def average(numbers):
    total=sum(numbers)
    total=float(total)
    total=total/len(numbers)
    return total


Help please!


#2

The tyler dictionary is missing the closing curly brace.


#3

Its there, it was just on its own line


#4

Funny, we cannot see it above. Be sure your lloyd dictionary line has not indentation.


#5

it doesn't have indentation


#6

Please repost your code. Thanks.


#7

I'm so sorry but i found the mistake. thanks for offering to help though.


#8

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