0

Why my function not returning the value i want

Here I have made a factorial function and made a return statement for fac inside if statement but is not returning but code is running inside the if statement because when i use a print statement inside if statement it is working. https://code.sololearn.com/cUbfHraYV4QP/?ref=app

14th Nov 2022, 6:16 AM
Akash
Akash - avatar
1 Answer
+ 1
You have to return the value of all call of factorial (see "else" block)
14th Nov 2022, 7:08 AM
KrOW
KrOW - avatar