Print those grades


#1



It looks like your function did not print the grade: 100.


I checked the Q&A forum and saw that the exact same code passed the exercise but I can't. I will be glad if you can tell me what's wrong with my code. Thanks in advance!


grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

def print_grades(grades):
    for grade in grades:
        print grade


#2

Hi you've probably solved it by now but i think you're missing a
print print_grades(grades)
at the bottom like
def print_grades(grades):
for grade in grades:
print grade
print print_grades(grades)
Hope that helps.
Andy


#3

I tried this one. It just prints 100. I need all the grades to be printed!


#4

Did you include both print lines?
print grade in the loop where you have it and print print_grades(grades) at the bottom?


#5

Sorry for that, my bad! I've tried a couple of things before posting. And I've written instead of print grades I've written return grades. I've found my mistake and thank you for the help! Appreciated!


#6

No problem glad i was able to help.


#7

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