+ 1
How to calc the factorial of n depth k.. Help me please
"Def fact(n, k)" should return factorial n depth k # fact(6, 3) > (6 * 5 * 4) > 120
2 Antworten
+ 1
Thanks, but with n=4 k=3 return NOT 24 (4*3*2=24). I came up with. My version :
i=1
p=1
c=n
If k==1:
return n
while i<k:
p=n*(c-i)
n=p
i+=1
return p
0
Good morning, Nick :) . In any case, thanks for the help))