MODULE 4: Lesson 1 Flashcards
WHAT IS A DECISION CONTROL
STRUCTURE?
• 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.
TYPES OF DECISION
CONTROL STRUCTURES
• 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.