Up until now we have seen very linear programs. These programs follow from one statement to the next, never deviating. They’re just a linear shopping list; you get the vegetables first, then bread, then canned vegetables, and finally cat food. Why? Because that’s the order that those items typically appear in a supermarket.
But what if you wanted to make simple changes? What if your program could decide what to do, based upon the input it was given?