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?

(1 point)
Responses

if x == 1:
return 1
if x == 1: return 1

num = 3
num = 3

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

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

1 answer

The code that reflects the recursive case is:

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

or

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

These lines represent the point where the function calls itself (recursion) to calculate the factorial for a value smaller than the original.