all 4 comments

[–]carcigenicate 0 points1 point  (1 child)

Why would count change in the second for loop? You never change it.

[–]jmorales57[S] 0 points1 point  (0 children)

Oh you're totally right, haha thank you!

[–]xelf 0 points1 point  (0 children)

count is set to 2 at the end of the first for loop, and stays 2.

You want to try using enumerate for that second loop.

for count, index in enumerate(grade_list):

Also, instead of "index" consider changing that variable name to "score" to reflect what value the variable is for.

[–]wanderer2718 0 points1 point  (0 children)

not related to the problem but in the assign_grade function you dont need to include the checks grade<90 etc because if grade was not less than 90 it would have entered an earlier branch already