# Fatal Error? Student becomes teacher, sending a letter

#1

What is wrong with my code??
I got this error message:

Something went wrong
Click Close to try again or refresh the page.

Traceback (most recent call last):
File "python/cli_runner.py", line 152, in

My code is here:

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)
return float(total) / len(numbers)

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

``return 0.1 * homework + 0.3 * quizzes + 0.6 * tests``

> if score >= 90ï¼š
> return "A"
> elif score >= 80:
> return "B"
> elif score >= 70:
> return "C"
> elif score >= 60:
> return "D"
> else:
> return "F"
> print score

> a = get_average(lloyd)

#2

Did you refresh your page as instructed?

#3

Yes, I did many times.

#4

Possibly refresh your browser, or try it on a different browser, and tell me what happens?

#6

I just tried Opera and Chrome, and the result is the same.

#7

Anyone could help?

#8

refresh it men it works with me

#9

It's rather crucial that you make it possible to reproduce what's going on if others are to figure it out - one should be able to copy what's in your post and get the same result.

You've probably got characters in your code that are not within the ascii range, and that environment doesn't support unicode

Searching the file for ranges outside ascii produces:

``````\$ ack "[\x80-\xff]" delme
> if score >= 90ï¿½ï¿½``````

#10

Thanks everyone, same code worked on another computer, don't know why. Thanks anyway