id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

david.white@denison.edu cs111fall2019 > recFactorial
prev  |  next  |  chance

Write a recursive function that computes the factorial of n (often denoted n!), i.e. the product n(n-1)(n-2)...(3)(2)(1). Your function MUST be recursive. You may assume the factorial of zero is one.


recFactorial(4) → 24
recFactorial(5) → 120
recFactorial(6) → 720

...Save, Compile, Run (ctrl-enter)

def recFactorial(n):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy