MODULE 4: Lesson 1 Flashcards

1
Q

WHAT IS A DECISION CONTROL
STRUCTURE?

A

• Decision Control Structure refers to the ability of a program to decide the flow of execution based on certain conditions.
• It allows programs to make decisions and execute different code paths based on those decisions.
• Commonly used in conditions where choices or comparisons are needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

TYPES OF DECISION
CONTROL STRUCTURES

A

• IF STATEMENT -
The if statement executes a block of code if the given
condition is true.

• IF-ELSE STATEMENT -
The if-else statement provides an alternative path if the condition is false.x

• NESTED IF STATEMENTS - Nested if statements allow an if
statement inside another if or else block for complex decision-making.

• ELSE IF LADDER
- The else if ladder is used when you need to
check multiple conditions in sequence.

• SWITCH CASE
STATEMENTS
- The switch statement
allows you to choose one block of code to execute from multiple options based on the
value of a variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly