Can anyone help me find the problem in my code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anyone help me find the problem in my code

When I return a variabele in the base case of my recursive function, it does not receive the value and receives None instead. Here is the code. https://code.sololearn.com/cGe1BnU3vIgA/?ref=app

13th Aug 2023, 10:44 AM
Mohammed Amin Elm
Mohammed Amin Elm - avatar
1 Answer
+ 4
Hi. You forgot to return 'count' at the end of 'calculatePaths'. If you add that, it works. You don't return anything, therefore "None" is what you get.
13th Aug 2023, 12:57 PM
Marcos Chamosa Rodríguez
Marcos Chamosa Rodríguez - avatar