Can you predict recursion easier? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Can you predict recursion easier?

I was just wondering whether there is an easier way to work out what recursion (self-referencing in functions) is going to output. The reason for me asking this is because I found predicting it really tricky in Area 6 Lesson 6. Or is the only way to write it out step by step?

4th Nov 2017, 7:21 PM
Max S
1 Resposta
+ 3
1. Look at the else condition: What is the first result? 2. Look at the exit condition: What does it return? 3. Look at the else condition again: What are the intermediary steps?
18th Apr 2018, 7:41 PM
Johannes
Johannes - avatar