Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
factorial.py
#python 3.5.2 #factorial def fact(num): if num==0: return 1 else: fact=1 for i in range(1,num+1): fact=fact*i return fact fact=fact(10) print('10! = ',fact) #using recursion def fact(num): if num==0: return 1 else : return num*fact(num-1) fact=fact(5) print('5! = ',fact )
run
|
edit
|
history
|
help
0
Q4
emoji
ejemplo2_python_20.068.214-9
My Personal data
Adivina el número
ASCII Art
dictionary function
Lesson 2-ex
75
Well, this seems bad.