Answers
>
Python
>
Mentoring
>
Article
Write a recursive function to find the factorial of a number n.
def factorial(n): if n == 1 or n == 0: return 1 else: return n * factorial(n-1)
MB
Answered by
Micah B.
•
Python tutor
1779 Views
See similar Python Mentoring tutors
Related Python Mentoring answers
All answers ▸
What would output this code? print(hello world)
What can I do with Python?
What is the difference between a list and an array?
Write a function that takes an imput (call it usr_in), the user's age (usr_age) and the user's name (usr_nm) and outputs the following string: "Hi, My name is [usr_nm], I am [usr_age] years old, and my favorite number is [usr_in]"