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
1682 Views
See similar Python Mentoring tutors
Related Python Mentoring answers
All answers ▸
Create an rock, paper, scissors game. The user should input one option, and the computer should play randomly.
Which four data types are used in Python? Can you give an example of each?
What built-in types does python provide?
When to use a dectionary or a list