Tag Archives: Conditional Statements

Conditional Statements

Some decisions are inevitable

inevitable decisions Under certain conditions some decisions are sometimes in normal life inevitable, as we can can see in our photo. It’s the same for every program, which has to solve some useful problem. There is hardly a way to program without having branches in the flow of code.

In programming and scripting languages, conditional statements or conditional constructs are used to perform different computations or actions depending on whether a condition evaluates to true or false. (Please note that true and false are always written as True and False in Python.)

The condition usually uses comparisons and arithmetic expressions with variables. These expressions are evaluated to the Boolean values True or False. The statements for the decision taking are called conditional statements, alternatively they are also known as conditional expressions or conditional constructs.

The if-then construct (sometimes called if-then-else) is common across many programming languages, but the syntax varies from language to language. Continue reading Conditional Statements