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

why does it print atm?.. i don't understand.. plz help

OpenStudy (e.mccormick):

Why does what? Link to code on a paste service so we can look at it? Please do not just paste here unless you put ``` (the one that shares ~) above and below. The differences is this: for x in range(10) some loop stuff some more looping! ``` for x in range(10) some loop stuff some more looping! ``` Now copy and paste both of those.... The top will probably collapse on you.

OpenStudy (anonymous):

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

OpenStudy (anonymous):

this is one of the quiz questions. quiz 1 , #3

OpenStudy (anonymous):

adding a print statement helps http://dpaste.com/1345029/

OpenStudy (anonymous):

Do you know that in recitation 5 the TA explained that problem? the video address for recitation 5 is http://www.archive.org/download/MIT6.00SCS11/MIT6_00SCS11_rec05_300k.mp4

OpenStudy (anonymous):

f('mat') = ff('at') + 'm' f('at') = ff('t') + 'a' = 't' +'a' = 'ta' ff('at') = f('ta') = ff('a') + 't' = 'at' f('mat') = ff('at') + 'm' = 'at' + 'm' ='atm'

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!