conditional statement

noun
UK /kənˈdɪʃənəl ˈsteɪtmənt/
US /kənˈdɪʃənəl ˈsteɪtmənt/

A conditional statement is a sentence that says one thing will happen if another thing happens.

If it rains, then we will stay inside is a conditional statement.


OTHER MEANINGS

2. In programming, a line of code that runs only when a certain test is true.

The program uses a conditional statement to check if the password is correct.

3. In grammar, a sentence with an if-clause and a main clause.

If you study hard, you will pass the test is a conditional statement.

4. In math, a statement of the form if P then Q.

If a number is even, then it is divisible by two is a conditional statement.