Deck 13: Recursion

ملء الشاشة (f)
exit full mode
سؤال
A recursive module is similar to a ________ in that it must have some way to control the number of times it repeats.

A)Loop structure
B)Case structure
C)If-Then structure
D)If-Then-Else structure
E)None of the above
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Which of the following is a mathematical game that is often used in computer science textbooks to demonstrate the power of recursion?

A)Rubik's Cube
B)Chess
C)Blackjack
D)Hangman
E)The Towers of Hanoi
سؤال
The total number of times a module calls itself recursively is known as the ________ of recursion.

A)Height
B)Weight
C)Time
D)Depth
E)None of the above
سؤال
The process of calling a module requires several actions to be performed by the computer and is referred to as ____________.

A)Overhead
B)Maintenance
C)memory intensive
D)Inefficiency
E)None of the above
سؤال
A ____________ module is a type of module that calls itself.

A)Numeric
B)String
C)Recursive
D)Library
E)None of the above
سؤال
When module A is calling module B and module B calls module A,it is called ___________ recursion.

A)B to A and A to B call
B)A to B and B to A call
C)Loop
D)Indirect
E)None of the above
سؤال
In the _________ case the problem is reduced to a smaller version of the original problem.

A)Base
B)Recursive
C)Loop
D)Return
E)None of the above
سؤال
The first step in setting up a recursive module is to ________________________________.

A)Identify at least one case in which the problem can be solved with recursion.
B)Identify at least one case in which the problem can be solved without recursion.
C)Identify the case with the repetitive block
D)Identify the case without the repetitive block
E)None of the above
سؤال
Recursion can be a powerful tool for solving ____________ problems.

A)Complex decision
B)Repetitive
C)Multiple selections
D)Mathematical
E)None of the above
سؤال
Which of the following can be solved with recursion?

A)Finding the greatest common divisor
B)Binary search
C)The Fibonacci Series
D)None of the above
E)All of the above
سؤال
Comparing the recursive algorithm of a binary search with its counterpart,without recursion,it is much more elegant and easier to understand.
سؤال
The majority of repetitive programming tasks are best done with which of the following?

A)Loops
B)Decision structures
C)Recursion
D)Sequence structures
E)All of the above
سؤال
Each time a recursive module calls itself,it creates a new _________ of the parameters of the modules.

A)Object
B)Instance
C)Events
D)Memory location(s)
E)None of the above
سؤال
If a recursive module calls itself ten times,after the tenth call it returns to the __________.

A)End of the module
B)ninth call
C)first call
D)End of the program
E)None of the above
سؤال
When the recursive module makes the last call to itself,the If-Then statement's condition expression is _________.

A)false
B)True
C)1
D)0
E)Unpredictable
سؤال
If a recursive module has no code to stop it from repeating then it is like a ____________ loop.

A)Iterative
B)While
C)Infinite
D)Do-While
E)Do-Until
سؤال
In the following example,how many times does the module calls itself?
Module main ()
Call Welcome (5)
End Module
Module Welcome (Integer number)
If number > 0 Then
Display "Welcome to our store."
Call Welcome (number - 1)
End If
End Module

A)5
B)6
C)7
D)8
E)0
سؤال
A problem can be solved with recursion if it can be broken down into ____________ that are identical to the overall problem.

A)Successive smaller problems
B)Successive smaller modules
C)Smaller problems
D)Smaller modules
E)None of the above
سؤال
The choice between using recursion or a loop is primarily a __________ decision.

A)Design
B)Case
C)Group
D)Any of the above
E)None of the above
سؤال
Recursive algorithms are more efficient that iterative algorithms.
سؤال
When a recursive algorithm terminates its nth instance of the module call,it returns to the point in the __________ instance directly after the recursive module call.
سؤال
If a recursive module does not have an incorrect conditional expression,the module is like a(n)___________ loop.
سؤال
In a recursive algorithm,the computer completes the base case first and then works on the recursive cases.
سؤال
In a recursive call,the computer actions of setting up memory for parameters and local variables and storing the address of the program location where control returns after the module terminates is called ______________.
سؤال
____________________ is a powerful tool for solving some repetitive problems.
سؤال
The _______ is the number of times a recursive module calls itself.
سؤال
When creating a recursive algorithm it is optional to identify the base case and the recursive case of the algorithm.
سؤال
There can be several modules involved in a recursive algorithm.
سؤال
The recursive calls stop when the conditional expression becomes _________.
سؤال
It is not necessary to have a conditional expression to terminate the recursive calls.
سؤال
One of the advantages of a recursive algorithm is that it does not matter how many recursive calls are made to a module; only one instance of the parameters are needed.
سؤال
A recursive algorithm is never required to solve a problem.
سؤال
The depth of recursion refers to the length and complexity of the recursive algorithm.
سؤال
It is possible for a module to call itself.
سؤال
When a recursive module calls only itself,it is called a ___________ recursion.
سؤال
When,in a recursive algorithm,module A calls module B,module B calls module C,which calls module A,it is called ___________ recursion.
سؤال
Each time a module is called recursively,a new _________ of the parameters are created.
سؤال
The term callback potential refers to number of times a module calls itself.
سؤال
A module that calls itself is known as a _____________ module.
سؤال
The Fibonacci Series is a well-known mathematical problem that is solved recursively.
سؤال
When setting up a recursive module,the part of the problem that can be solved without recursion is known as the __________ case.
سؤال
Recursive algorithms can be written with modules or _____________ with a return value.
سؤال
If a module has called itself six times,the depth of recursion was ____________.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/43
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 13: Recursion
1
A recursive module is similar to a ________ in that it must have some way to control the number of times it repeats.

A)Loop structure
B)Case structure
C)If-Then structure
D)If-Then-Else structure
E)None of the above
A
2
Which of the following is a mathematical game that is often used in computer science textbooks to demonstrate the power of recursion?

A)Rubik's Cube
B)Chess
C)Blackjack
D)Hangman
E)The Towers of Hanoi
E
3
The total number of times a module calls itself recursively is known as the ________ of recursion.

A)Height
B)Weight
C)Time
D)Depth
E)None of the above
D
4
The process of calling a module requires several actions to be performed by the computer and is referred to as ____________.

A)Overhead
B)Maintenance
C)memory intensive
D)Inefficiency
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
5
A ____________ module is a type of module that calls itself.

A)Numeric
B)String
C)Recursive
D)Library
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
6
When module A is calling module B and module B calls module A,it is called ___________ recursion.

A)B to A and A to B call
B)A to B and B to A call
C)Loop
D)Indirect
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
7
In the _________ case the problem is reduced to a smaller version of the original problem.

A)Base
B)Recursive
C)Loop
D)Return
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
8
The first step in setting up a recursive module is to ________________________________.

A)Identify at least one case in which the problem can be solved with recursion.
B)Identify at least one case in which the problem can be solved without recursion.
C)Identify the case with the repetitive block
D)Identify the case without the repetitive block
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
9
Recursion can be a powerful tool for solving ____________ problems.

A)Complex decision
B)Repetitive
C)Multiple selections
D)Mathematical
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
10
Which of the following can be solved with recursion?

A)Finding the greatest common divisor
B)Binary search
C)The Fibonacci Series
D)None of the above
E)All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
11
Comparing the recursive algorithm of a binary search with its counterpart,without recursion,it is much more elegant and easier to understand.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
12
The majority of repetitive programming tasks are best done with which of the following?

A)Loops
B)Decision structures
C)Recursion
D)Sequence structures
E)All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
13
Each time a recursive module calls itself,it creates a new _________ of the parameters of the modules.

A)Object
B)Instance
C)Events
D)Memory location(s)
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
14
If a recursive module calls itself ten times,after the tenth call it returns to the __________.

A)End of the module
B)ninth call
C)first call
D)End of the program
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
15
When the recursive module makes the last call to itself,the If-Then statement's condition expression is _________.

A)false
B)True
C)1
D)0
E)Unpredictable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
16
If a recursive module has no code to stop it from repeating then it is like a ____________ loop.

A)Iterative
B)While
C)Infinite
D)Do-While
E)Do-Until
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
17
In the following example,how many times does the module calls itself?
Module main ()
Call Welcome (5)
End Module
Module Welcome (Integer number)
If number > 0 Then
Display "Welcome to our store."
Call Welcome (number - 1)
End If
End Module

A)5
B)6
C)7
D)8
E)0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
18
A problem can be solved with recursion if it can be broken down into ____________ that are identical to the overall problem.

A)Successive smaller problems
B)Successive smaller modules
C)Smaller problems
D)Smaller modules
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
19
The choice between using recursion or a loop is primarily a __________ decision.

A)Design
B)Case
C)Group
D)Any of the above
E)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
20
Recursive algorithms are more efficient that iterative algorithms.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
21
When a recursive algorithm terminates its nth instance of the module call,it returns to the point in the __________ instance directly after the recursive module call.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
22
If a recursive module does not have an incorrect conditional expression,the module is like a(n)___________ loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
23
In a recursive algorithm,the computer completes the base case first and then works on the recursive cases.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
24
In a recursive call,the computer actions of setting up memory for parameters and local variables and storing the address of the program location where control returns after the module terminates is called ______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
25
____________________ is a powerful tool for solving some repetitive problems.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
26
The _______ is the number of times a recursive module calls itself.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
27
When creating a recursive algorithm it is optional to identify the base case and the recursive case of the algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
28
There can be several modules involved in a recursive algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
29
The recursive calls stop when the conditional expression becomes _________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
30
It is not necessary to have a conditional expression to terminate the recursive calls.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
31
One of the advantages of a recursive algorithm is that it does not matter how many recursive calls are made to a module; only one instance of the parameters are needed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
32
A recursive algorithm is never required to solve a problem.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
33
The depth of recursion refers to the length and complexity of the recursive algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
34
It is possible for a module to call itself.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
35
When a recursive module calls only itself,it is called a ___________ recursion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
36
When,in a recursive algorithm,module A calls module B,module B calls module C,which calls module A,it is called ___________ recursion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
37
Each time a module is called recursively,a new _________ of the parameters are created.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
38
The term callback potential refers to number of times a module calls itself.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
39
A module that calls itself is known as a _____________ module.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
40
The Fibonacci Series is a well-known mathematical problem that is solved recursively.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
41
When setting up a recursive module,the part of the problem that can be solved without recursion is known as the __________ case.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
42
Recursive algorithms can be written with modules or _____________ with a return value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
43
If a module has called itself six times,the depth of recursion was ____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.