1. What process locates a specific set of characters in a data set?

a. data collection
b. data analysis
c. pattern matching
d. iteration

2. What is an example of a branching control structure?

a. for loop
b. if…then
c. while loop
d. do loop

3. How do we generally alter the parameter to get to the base case?

a. adding one to the parameter
b. decrementing the parameter
c. setting the parameter to zero
d. incrementing the parameter

4. When performing a recursion, how do you describe the act of a function calling itself?(1 point)

a. forward phase
b. recursive case
c. base case
d. backward phase

5. The following code is for a Python function to represent a recursive function to find the factorial of an integer

def factorial(x):
if x == 1:
return 1
else:
return (x * factorial(x-1))
num = 3

print("The factorial of", num, "is", factorial(num))

Which code reflects the recursive case?

a. else:
return (x * factorial(x - 1))

b. if x == 1:
return 1

c. num = 3

d. print("The factorial of", num, "is", factorial(num))