Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 17 Online
OpenStudy (anonymous):

Quiz 1, number 3, the double recursion program. I am having a tough time seeing what should be printed. Is there a way to analyze this with a chart?

OpenStudy (anonymous):

can we see the code?

OpenStudy (anonymous):

def f(s): if len(s) <= 1: return s return f(f(s[1:])) + s[0] #Note double recursion print f('mat') print f('math')

OpenStudy (anonymous):

For some reason, the spaces I insert are not being displayed...

OpenStudy (anonymous):

i do not see any inserted spaces in your code though...

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!