O'Reilly logo

Programming for the Absolute Beginner by Jerry Lee Ford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Making Decisions with Conditional Logic

As you have already seen in numerous examples in this book, to create applications of any degree of complexity, a computer program needs a way of evaluating different values in order to determine a logical direction in which to proceed. This is done through the use of conditional programming statements that use mathematical, comparison, and logical operators in order to compare different values and decide upon a course of action. By implementing conditional logic, you can create applications that react differently based on the data they are presented with. This will not only provide an interactive user experience but also results in programs that are adaptive enough to handle different types of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required