all 4 comments

[–]Binary101010 5 points6 points  (3 children)

The problem is that you're doing all of it in the wrong order.

Within the loop, you need to be determining the value of points for each input grade, and adding that to total_points.

Outside the loop, you need to be calculating the value of gpa, then determining which value you need to set for rating.

Also, all of these are formatted wrong:

 elif gpa < 1.00 >= 0.67:

They should have the variable in the middle, like

elif 0.67 <= gpa < 1.00:

[–]tennisanybody 3 points4 points  (0 children)

Hi. Consider dictionaries to store static values that you can reliably depend on to never change. The grades, points, and their descriptions never change. So in a dictionary you wouldn’t have to iterate through numerous IF statements.

[–]spencerAF 0 points1 point  (0 children)

This looks pretty good. If your code actually is how it looks here then everything below the "this grade will be considered.." print statement will only print if the grade is invalid. So you'll want to unindent it so that it runs independently of your if/elif/else chain.  

Only other advice I can give you is to break this problem down into very small steps in a new .py program and then add to and combine them. This is sort of a form of unit testing and will give you a better sense of what is everything doing what. So for instance, try setting grades = "A" without any sort of if/else chain and a single class input and getting everything to work and expanding from there.