We said we should look at problems ... in that order. So we first implemented this model: grade = float(raw_input("Enter grade: ")) if (grade > 4): print "Too big." if grade >= 3.85 and grade <= 4: print "A" if grade >= 3.5 and grade < 3.85: print "A-" ... if grade >= 0.85 and grade <= 1.15: print "D" if grade >= 0.35 and grade < 0.85: print "D-" if grade >= 0 and grade < 0.35: print "F" if grade < 0: print "Too small." We said this is a linear sequence of if statements. The conditions are mutually exclusive and context-free. It really doesn't matter in what order we ask them. It also doesn't matter which one prints the answer: the others still get evaluated (all of them). So we decided to look at alternative ways of programming this problem: if grade > 4: print "Numbers too big." else: if grade >= 3.85: print "A" else: if grade >= 3.5: print "A-" else: if grade >= 3.15: print "B+" else: if grade > 2.85: print "B" else: ... if grade >= 0.35: print "D-" else: if grade >= 0: print "F" else: print "Negative number. Not allowed." This second program builds knowledge as it goes through cases, testing. In this second program the order in which we test is important. Removing the else's would be a grave mistake. So we don't attempt it. However in pytohn else followed by an if has a contraction: elif. So we can write the program like before: if grade > 4: print "Numbers too big." elif grade >= 3.85: print "A" elif grade >= 3.5: print "A-" elif grade >= 3.15: print "B+" elif grade > 2.85: print "B" elif ... : ... elif grade >= 0.35: print "D-" elif grade >= 0: print "F" else: print "Negative number. Not allowed." The leap year program is another example where a nested collection of if statements is intuitive. As an exercise we ask that you also try to express the whole condition in one long expression, and use it in only one if. --