CP M2 : Sequential and Selection Control Structures

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

12 Terms

1
New cards

Sequential Control Structure

Refers to the line-by-line execution by which statements are executed sequentially, in the same order in which they appear in the program.

2
New cards

Selection Control Structure

Allows one set of statement to be executed if a condition is true and another set of actions to be executed if a condition is false.

3
New cards

if

Used to specify a block of code to be executed, if a specified condition is true

4
New cards

else

Used to specify a block of code to be executed, if the same condition is false

5
New cards

else if

Used to specify a new condition to test, if the first condition is false

6
New cards

switch

Used to specify many alternative blocks of code to be executed

7
New cards

The simplest of the three fundamental control structure.

Sequential Control Structure

8
New cards

The Nested if Statements

you can use one if or else if statement inside another if or else if statement(s).

9
New cards

It simplifies the process of checking the same variable for a set of different equality values.

The switch-case conditional

10
New cards

break keyword

This will stop the execution of more code and case testing inside the block.

11
New cards

default keyword

specifies some code to run if there is no case match

12
New cards

The Nested switch Statement

a programming construct where one switch statement is placed inside another switch statement.