Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Defining a Recursive Function

In this lesson, you’ll learn that all recursive functions have two parts:

  1. Recursive case
  2. Base case

You’ll also see how to define the factorial symbol recursively:

def factorial_recursive(n):
    if n <= 1:
        return 1
    return n * factorial_recursive(n - 1)

kwf777 on Dec. 23, 2019

So now you’ve brought out the project manager in me. Explain why 7 resources instead of 1 to do the same job is economically feasible and makes good business sense?

James Uejio RP Team on Dec. 31, 2019

Hi kwf777,

Feel free to take a look at the last video in this course where I give some real world examples on why you would use recursion over other techniques.

JulianV on Jan. 31, 2020

Nice warm up!

Become a Member to join the conversation.