128k views
0 votes
_______ statements will execute an action when the condition is true and no action when the condition is false.

A. elif
B. if
C. if-else
D. when

1 Answer

2 votes

Answer:

B. if

Step-by-step explanation:

In Computer programming, there are four (4) main types of statements used in the decision-making process and these are;

I. If statement.

II. If....else statement.

III. Else.....if statement.

IV. Nested if...else statement.

However, only the first test expression would be executed when it is true and then the program is terminated. Otherwise, the program would continue to run until it gets to the breaking point (else statement) and then terminates.

This ultimately implies that, an If statement will execute an action when a particular condition is true (1) and no action will be executed when the condition is false (0).

User Zachary Kniebel
by
4.3k points