"Shawn Blazer" wrote
Hello! I'm a high school student, and I'm having some trouble
learning recursion in my class...
For example:
Trace the sequence of recursive calls that glee(2,1) spawns:
def glee ( idol , scrub ) :
if idol == 0 :
return scrub
elif idol < 0 :
return scrub + glee ( idol +
On 5/28/2010 3:09 PM Shawn Blazer said...
Hello! I'm a high school student, and I'm having some trouble learning
recursion in my class...
For example:
Trace the sequence of recursive calls that glee(2,1) spawns:
I imagine what you'd need to do is manually follow the code for glee
step-by-step
Hello! I'm a high school student, and I'm having some trouble learning
recursion in my class...
For example:
Trace the sequence of recursive calls that glee(2,1) spawns:
def glee ( idol , scrub ) :
if idol == 0 :
return scrub
elif idol < 0 :
return scrub + glee ( idol + 10 , idol % 3 )
else :