Did not use " \" but code works?



Here is my code -

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

It worked, got my 'green' bookmark. But I did not use the \ as demonstrated in the example.
Is this good or bad? Were we suppose to use it, because I did but kept getting the the error - "Unexpected character after continuation character". Just need insight, were we suppose to use the continuation character? Also I got the 'green' bookmark but "None" appeared in console Window, am I doing this exercise right?



There is always more than one way to solve a problem. Congrats, you probably found a new way to solve the problem! :stuck_out_tongue_closed_eyes:


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