Repetition Statement Flashcards

1
Q

As we know, a program consists of lists of _____.

A

instructions.

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

_______ are programming blocks that can change the path we take through those instructions or not.

A

Control structures

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

Control structures are ________ that can change the path we take through those instructions or not.

A

programming blocks

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

Control structures are programming blocks that can _________ we take through those instructions or not.

A

change the path

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

It is a ________ in a
programming language to express the flow of control.

A

syntactic form

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

It is a syntactic form in a
1. ________ to express the 2. _____.

A
  1. programming language
  2. flow of control
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

_______ are also called loops and it is a block of code to be executed for a fixed number of times or until a certain specified condition is met.

A

Repetition statements

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

Repetition statements are also called 1. _____ and it is a 2. _____ to be 3. _____ for a fixed number of times or until a certain specified condition is met.

A
  1. loops
  2. block of code
  3. executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Repetition statements are also called loops and it is a block of code to be executed for a 1. _______ or until a certain specified 2. ______.

A
  1. fixed number of times
  2. condition is met
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

It encircles the 1. _____ for a 2. _____.

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

This structure is similar to the selection structure in the sense that once the said or specified condition or conditions is/are
1. _____, the 2. __________ is executed but differs in that the execution of this block is carried out 3. _______ until the condition becomes false then this block is exited and flow of control continues from the next line of code or statement immediately after the repetition statement.

A
  1. met or true
  2. repetition statement block
  3. continuously (looping)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

This structure is similar to the selection structure in the
sense that once the said or specified condition or conditions is/are met or true, the repetition statement block is executed but differs in that the execution of this block is carried out continuously (looping) until the condition becomes 1. ____ then this block is 2. _____
and flow of control continues from the next line of code or statement immediately after the repetition statement.

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

_______ in Java are statements that
allow a set of instructions to be performed repeatedly as long as a specified condition remains true.

A

Looping Constructs

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

Looping Constructs in Java are statements that
allow a 1. ________ to be performed 2. ______ as long as a specified condition remains3. _____.

A
  1. set of instructions
  2. repeatedly
  3. true
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Java provides 1. ________ that enable control of the flow of execution by repetitively performing a set of statements as long as the continuation condition remains true.

A
  1. three repetition looping statements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Java provides three repetition looping
statements that enable _______ by repetitively performing a set of statements as long as the continuation condition remains true.

A

control of the flow of
execution

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

Java provides three repetition looping
statements that enable control of the flow of
execution by 1. ______ performing a 2. _____- as long as the continuation 3. ______

A
  1. repetitively
  2. set of statements
  3. condition remains true
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are the three looping statements

A

for, while, and do…while
statements.

19
Q

The Java ______ is used to iterate a part of the program several times. If the number of iteration is fixed, it is recommended to use for loop.

20
Q

The Java for loop is used to iterate a part of the program several times. If the number of iteration is ____, it is recommended to use for loop.

21
Q

The Java _____ is used to iterate a part of the program several times. If the number of iteration is not fixed, it is recommended to use while loop.

A

while loop

22
Q

The Java ________ is used to iterate a part of the program several times. Use it if the number of iteration is not fixed and you must have to execute the loop at least once.

A

do-while loop

23
Q

The Java while loop is used to iterate a part of the program several times. If the number of iteration is ______, it is recommended to use while loop.

24
Q

Why do we need
Loops?

A

Loops facilitate ‘Write less, Do more
They reduce the size of the Code.
Loops make an easy flow of the control.
They also reduce the Time Complexity and Space
Complexity

25
Loops facilitate _______- We don't have to write the same code again and again.
'Write less, Do more '
26
They reduce the _____
size of the Code
27
Loops make an ______
easy flow of the control.
28
They also reduce the 1. ______ and 2. ______ - Loops are faster and more feasible as compared to Recursion.
1. Time Complexity 2. Space Complexity
29
Loops are1. _____ and 2. _____ as compared to 3. _____.
1. faster 2. more feasible 3. Recursion
30
Java _____ is used to run a block of code for a certain number of times.
for loop
31
The ______ initializes and/or declares variables and executes only once.
initial Expression
32
The ______ is evaluated. If the condition is true, the body of the for loop is executed.
condition
33
The ________ updates the value of initial Expression.
update Expression
34
The condition is evaluated again. The process continues until the condition is ____.
false
35
The _____ is used when the number of iterations is not known but the terminating condition is known.
while loop
36
The loop is executed until the given condition evaluates to _____.
false
37
while loop is also an ________ as the condition is checked before entering the loop
entry controlled loop
38
A while loop evaluates the 1. ______ inside the 2. ______ ()
1. textExpression 2.parenthesis
39
If the 1. _______ evaluates to true, the code inside the while loop is 2.______.
1. textExpression 2. executed
40
When the textExpression evaluates to false, the loop _____.
stops
41
A loop is called _______, if it never ends which means the condition specified by the loop never returns false.
infinite loop
42
____ are essential tools that let us run a block of code multiple times based on a given condition.
loops
43
1. _____ are important structures in programming that allow repetitive tasks to be automated by running code again and again under specific conditions.
Loops