+ 5

How to use recursion ?

I am unable to use recursion in python. I tried so many time but I couldn't understand recursion. Help me.......!

23rd Dec 2020, 6:22 PM
Abhilash Chaurasiya
Abhilash Chaurasiya - avatar
3 Respuestas
+ 2
I struggled with recursion. I just could not understand why the function didn't just return 1 (using factoral of a number as an example) I watched this one video.....and bingo...I got it......hope it helps (watch all of it). https://www.youtube.com/watch?v=kepBmgvWNDw&list=PLBlnK6fEyqRhX6r2uhhlubuF5QextdCSM&index=75&t=568s
23rd Dec 2020, 6:51 PM
rodwynnejones
rodwynnejones - avatar
+ 2
Use the function to call itself but don't forget the base condition.
23rd Dec 2020, 10:37 PM
Sonic
Sonic - avatar