8.Part of the Whole


#1

Can someone help me? I am stuck.

Here is my code.


#2

What errors are you getting? What isn't working in your code?


#3

For the last line of code you should have: return average(results)

Also, the final return line should be indented to the left (directly under 'for') so that it is not part of the for statement.


#4

I figured it out myself. Thanks for your help though!:grin:


#5

I wanted to know why this was wrong. I figured that because I separately identified what I wanted the program to do it would work but I continue to get error messages.

Does it need to be more concise?

my error message -


#6

line 54 should read results.append(result)


#8

help! I'm not sure how to correct this error.


#9

Here you go ...

get_letter_grade(get_average(lloyd))

def get_class_average(students):
results=[]
for student in students:
results.append(get_average(student))
return average(results)


#10

Thank you, I've been stuck on this for a little bit! Is it because I used classroom instead of students?


#11

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