Just weight and see HELP


#1



https://www.codecademy.com/en/courses/python-beginner-en-qzsCL/1/2?curriculum_id=4f89dab3d788890003000096


It says that that None

Save & Submit Code
Reset Code
Way to go! Start Next Lesson
Oops, try again. get_average(alice) raised the following error: unsupported operand type(s) for *: 'NoneType' and 'float


Replace this line with your code. 
def get_average(student):
    homework = average(student["homework"])
    quizzes = average(student["quizzes"])
    tests = average(student["tests"])
    get_average = (homework * 0.1 + quizzes * 0.3 + tests * 0.6)
    return get_average


#2

what is your question?


#3

So I dont know the question but i see you have 1 extra thing. you make a variable

get_average = (homework * 0.1 + quizzes * 0.3 + tests * 0.6)

but what are you trying to do with this?
you already defined get_average. so instead of doing

get_average = (homework * 0.1 + quizzes * 0.3 + tests * 0.6)
    return get_average

do

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

#4

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