Much of the power of computing comes from the ability to select which piece of code to run. This tutorial describes two ways of selecting which piece of code to run. Most students find that the if-then-else syntax is so close to the English language that it is easy to use. The case statement is a neat way of making a decision between several pieces of code. It is an alternative to using multiple if statements.
You will find very many examples of the effective use of if and case statements in the student programs and we provide links to selected examples in the next two pages.