 In a previous video, we had this flowchart for characterizing exercise depending on the percentage of maximum heart rate that you achieved. Here's the code we came up with. A multi-way if-else statement, as some books call it, or an if-else-if chain. And here it is in action. A percentage of 92.3 is a maximum workout, 67% is light, and 58% is very light. Beginning programmers often wonder why they need to do an if-else-if chain. Why not write it like this, with separate if statements? Let's see what happens when we run the program and use 92.3%. That seems to work fine. But when you give input, like 67%, you get three outputs, and for 58%, the program tells you four separate things. Why is there such a big difference between these two versions? To answer that, let's go back to the correct version and expand it to a version with all the braces. Using 67 as our input, 67 is not less than 60, which means we take the else clause. 67 is less than 70, which means we do the if clause and not the else clause, which contains all the other possibilities. Here's what we end up with in the shorter if-else-if chain version. Now take a look at the separate if version that doesn't work. I'm drawing lines between the if statements to emphasize that they really are separate. Again, using 67 as the input, 67 is not less than or equal to 60, which means the program doesn't print very light. That if statement has concluded. We now have a brand new if statement. 67 is less than 70, and the program prints light. That if statement has concluded. We move to a completely new if statement. 67 is also less than 80, and the program prints moderate. That if statement has concluded. Moving on to the final if statement, 67 is less than 90, the program prints hard, and skips the last else clause. And that's the difference between an if-else-if chain, where each if is dependent on the results of the proceeding entries, and a series of separate if statements, where each decision is independent of the others. Make sure you choose the right one for the effect you want your program to have.