Just Weight and See


#1

Hi. can any one help me to solve this program. I think that i wrote my program correct.

def get_average(student):
    homework = average(student["homework"])
    quizzes = average(student["quizzes"])
    tests = average(student["tests"])

return 0.1 * average(student["homework"]) + \ 0.3 * average(student["quizzes"]) + \ 0.6 * average(student["tests"])

when i click on save&submit it was showing me like this.

File "python", line 29
return 0.1 * average(student["homework"]) + \ 0.3 * average(student["quizzes"]) + \ 0.6 * average(student["tests"])
^
SyntaxError: unexpected character after line continuation character


#2

It would be a great help if you would format your code,


#3

can any one help me to solve this program


#4

you needed to apply markup, otherwise it is really difficult for us to tell where the problem is, @bandit tried to tell you this

Why do you use new line characters (/) while not putting the code to the next line? Remove the new line characters


#5

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