Deck 5: Repetition Structures

ملء الشاشة (f)
exit full mode
سؤال
Because programmers commonly need to repeat instructions, all programming languages provide repetition structures.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The Loop instruction can use only integers, or whole numbers, as the number of times to repeat.
سؤال
The following loop would execute ___________________ times:
Loop index from 0 up to (but not including) 10 times incrementing by 1
سؤال
Which of the following is an example of an infinite loop?

A) While 1 > 2
B) While 2 < 1
C) While 1 == 1
D) Loop 1000 times times
E) None of these
سؤال
The While instruction can be used to test the value of an object's property.
سؤال
The following loop would execute how many times? Loop index from 0 up to (but not including) 3 times incrementing by 1

A) 1
B) 2
C) 3
D) 4
E) None of these
سؤال
Which type of structure is used to execute the same set instructions more than once?

A) Decision structure
B) Sequence structure
C) Repetition structure
D) Do together structure
E) None of these
سؤال
A(n) ___________________ loop will repeat an unlimited number of times.
سؤال
The While instruction is a posttest loop.
سؤال
Because the condition is tested before the loop is repeated, what is another term for the While instruction?

A) Counter-controlled loop
B) Infinite loop
C) Posttest loop
D) Pretest loop
E) None of these
سؤال
The ___________________ instruction causes a set of instructions to execute as long as a specified Boolean expression is true.
سؤال
This is the type of variable that the Loop instruction uses internally.

A) Register
B) Counter
C) Matrix
D) Address
E) None of these
سؤال
Which type of instruction will cause a set of instructions to execute as long as a specified Boolean expression is true?

A) If/Else
B) Loop
C) Repeat
D) While
E) None of these
سؤال
The While instruction is also called a(n) ___________________ loop because the condition is tested before the loop is repeated.
سؤال
The Loop instruction causes a set of instructions to execute as long as a specified Boolean expression is true.
سؤال
The following loop would execute how many times? Loop 1 times times

A) 1
B) 2
C) 3
D) 4
E) None of these
سؤال
You can use a variable or a function call to specify the number of repetitions that a loop will perform.
سؤال
The complicated version of the loop instruction shows that the loop uses a counter variable named ___________________.
سؤال
The following loop would execute how many times? Loop index from 0 up to (but not including) 4 times incrementing by 2

A) 1
B) 2
C) 3
D) 4
E) None of these
سؤال
The ___________________ instruction causes a set of instructions to execute a certain number of times.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/20
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Repetition Structures
1
Because programmers commonly need to repeat instructions, all programming languages provide repetition structures.
True
2
The Loop instruction can use only integers, or whole numbers, as the number of times to repeat.
True
3
The following loop would execute ___________________ times:
Loop index from 0 up to (but not including) 10 times incrementing by 1
10
4
Which of the following is an example of an infinite loop?

A) While 1 > 2
B) While 2 < 1
C) While 1 == 1
D) Loop 1000 times times
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
5
The While instruction can be used to test the value of an object's property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
6
The following loop would execute how many times? Loop index from 0 up to (but not including) 3 times incrementing by 1

A) 1
B) 2
C) 3
D) 4
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which type of structure is used to execute the same set instructions more than once?

A) Decision structure
B) Sequence structure
C) Repetition structure
D) Do together structure
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
8
A(n) ___________________ loop will repeat an unlimited number of times.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
9
The While instruction is a posttest loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
10
Because the condition is tested before the loop is repeated, what is another term for the While instruction?

A) Counter-controlled loop
B) Infinite loop
C) Posttest loop
D) Pretest loop
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
11
The ___________________ instruction causes a set of instructions to execute as long as a specified Boolean expression is true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
12
This is the type of variable that the Loop instruction uses internally.

A) Register
B) Counter
C) Matrix
D) Address
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
13
Which type of instruction will cause a set of instructions to execute as long as a specified Boolean expression is true?

A) If/Else
B) Loop
C) Repeat
D) While
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
14
The While instruction is also called a(n) ___________________ loop because the condition is tested before the loop is repeated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
15
The Loop instruction causes a set of instructions to execute as long as a specified Boolean expression is true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
16
The following loop would execute how many times? Loop 1 times times

A) 1
B) 2
C) 3
D) 4
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
17
You can use a variable or a function call to specify the number of repetitions that a loop will perform.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
18
The complicated version of the loop instruction shows that the loop uses a counter variable named ___________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
19
The following loop would execute how many times? Loop index from 0 up to (but not including) 4 times incrementing by 2

A) 1
B) 2
C) 3
D) 4
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
20
The ___________________ instruction causes a set of instructions to execute a certain number of times.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.