Conditional Statements#

This chapter discusses the conditional statements which have prevalent use in programming. Conditional Statements in Python perform different computations or actions depending on whether a specific Boolean value evaluates to True or False. In this same chapter, we discuss Boolean expressions.

These conditions can be used in several ways, most commonly in if statements and loops. In the programming language conditional statements, perform different computations or actions based on the final evaluation of the Boolean condition specified by the programmer.

The actions are performed if the final computation of the Boolean condition evaluates to true and fails to act if the final computation of the Boolean program evaluates to false.