Python Control Structures Flashcards

1
Q

Three types of control structure

A

*Sequential structure
*Decision/Selection structure
*Repetition structure / Iterative

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

It is a control structure built into Python.

A

Sequential structure

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

This refers to the control structure that utilizes the if/elif/else statements.

A

Decision/selection structure

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

It is a control structure also known as the while repetition or for repetition structure.

A

Repetition structure / Iterative

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

This refers to the control structure that with normal flow/sequential execution, as well as line by line/normal execution.

A

Sequential structure

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

In this control structure, there will be a condition and based on the condition then the control will flow in only one direction.

A

Decision/Selection structure

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

It allows us to execute a statement or group of statement multiple times.

A

Loop statement

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

These are used to change the flow of execution from its normal sequence.

A

Loop control statements

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

This statement repeats a statement or group of statements while a given condition is TRUE. It tests the condition before executing the loop body.

A

While loop

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

It executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.

A

For loop

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

It is used in case the need is to iterate over a specific number of times within a given range in steps/intervals mentioned.

A

Range function in loops

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

It terminates the loop statement and transfers execution to the statement immediately following the loop.

A

Break statement

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

It causes the loop to skip the remainder of its body and immediately retest its condition.

A

Continue statement

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

It is used when a statement is required syntactically but do not want any command or code to execute or if the code needs to be implemented in the future, behaving like a placeholder for future code.

A

Pass statement

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

It is used when a statement is required syntactically but do not want any command or code to execute or if the code needs to be implemented in the future, behaving like a placeholder for future code.

A

Pass statement

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

A binary operator that evaluates to true if BOTH expressions are true.

A

and

16
Q

A binary operator that evaluates to true if AT LEAST ONE expression is true.

A

or

17
Q

A unary operator that returns true if the expression is false.

A

not