Exam 12: Recursion
Exam 1: Introduction to Computers and Programming39 Questions
Exam 2: Input, Processing, and Output40 Questions
Exam 3: Decision Structures and Boolean Logic40 Questions
Exam 4: Repetition Structures41 Questions
Exam 5: Functions66 Questions
Exam 6: Files and Exceptions40 Questions
Exam 7: Lists and Tuples40 Questions
Exam 8: More About Strings37 Questions
Exam 9: Dictionaries and Sets39 Questions
Exam 10: Classes and Object-Oriented Programming38 Questions
Exam 11: Inheritance36 Questions
Exam 12: Recursion35 Questions
Exam 13: Gui Programming42 Questions
Select questions type
The base case is the case in which the problem can be solved without
(Multiple Choice)
4.8/5
(88)
Which would be the base case in a recursive solution to the problem of finding the factorial of a number. Recall that the factorial of a non-negative whole number is defined as n! where:
If n = 0,then n! = 1
If n > 0,then n! = 1 x 2 x 3 x ...
X n
(Multiple Choice)
4.8/5
(80)
When,in a recursive solution,function A calls function B which,in turn,calls function A,this is known as indirect recursion.
(True/False)
4.9/5
(79)
A recursion in which a function directly calls itself is known as ___________ recursion.
(Short Answer)
4.9/5
(83)
Which of the following describes the base case in a recursive solution?
(Multiple Choice)
5.0/5
(90)
What is the first step to take in order to apply a recursive approach?
(Multiple Choice)
4.8/5
(78)
There must be only one function involved in any recursive solution.
(True/False)
4.9/5
(79)
Recursion is sometimes required to solve certain types of problems.
(True/False)
4.8/5
(73)
The base case does not require __________,so it stops the chain of recursive calls.
(Short Answer)
5.0/5
(80)
In many cases it is easier to see how to solve a problem with recursion than with a loop.
(True/False)
5.0/5
(89)
Usually a problem solved by recursion is reduced by making the value of one or more parameters __________ with each recursive call.
(Short Answer)
4.9/5
(73)
Showing 21 - 35 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)