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

 

tmhscs@gmail.com python > logic_factorial
prev  |  next  |  chance

Given an integer "n", return the factorial of the number. The factorial of a number is itself multiplied by every number smaller than it down to 1. Example: The factorial of 5 is 5*4*3*2*1.


logic_factorial(1) → 1
logic_factorial(2) → 2
logic_factorial(3) → 6

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

def logic_factorial(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

Post-solution available

Copyright Nick Parlante 2017 - privacy