6. Just Weight and See - Traceback error


#1



6. Just Weight and See

I get an error saying: "Traceback (most recent call last):
File "python/cli_runner.py", line 152, in "

Of course the big splash of "Something went wrong :frowning:
Click Close to try again or refresh the page." shows it face too.

I'm not sure what I'm doing wrong. It should do the function what I wrote. At least I would hope so.
Have I written the get_average function correctly? I also typed it with spaces in between and still the same problem. Then I deleted RETURN and wrote it from scratch. Worked! :slight_smile: Copied the old one next to new just to check. The last line is the same, so why the error in the first place?

    
def get_average(student):
    homework = average(student['homework'])
    quizzes = average(student['quizzes'])
    tests = average(student['tests'])
    return 0.1*homeworḱ + 0.3*quizzes + 0.6*tests


#2

Hi the error is from this line

return 0.1*homeworḱ + 0.3*quizzes + 0.6*tests

look close to homework you wrote

homeworḱ

with the ' on the k


#3

Thanks!
But I've never in my life typed that letter before until know. Didn't even see it. Don't even know how I got that. :smile:


#5

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