Loops and Loop Control Flashcards

1
Q

Enumerate the 3 Loop Types

A
  • While Loop
  • For Loop
  • Nested Loop
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Enumerate the 3 Loop Controls

A
  • Break Statement
  • Continue Statement
  • Pass Statement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

It is a sequence of instructions that is repeated continuously until a certain phase is reached.

A

Loop

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

It is a basic programming concept that is widely used in writing programs.

A

Loops

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

It allows multiple execution of a statement or a group of statements.

A

Loop statement

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

It is used to iterate over a block of code as long as the test expression (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
7
Q

is used to iterate a sequence (list, tuple, string) or other iterable objects.

A

For loop

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

Iteration over a sequence is called

A

Traversal

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

allows one loop to be used inside another loop

A

Nested Loops

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

It change the execution of the loop from its normal sequence.

A

Loop control statements

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

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
12
Q

Causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating. It returns the control to the beginning of the while loop.

A

Continue statement

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

is used when a statement is required syntactically but you do not want any command or code to execute. It is used when a statement is required syntactically but you do not want any command or code to execute.

A

Pass statement

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