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

For the first quiz, I don't understand the explanation to problem 1.2. I thought that if any problem could be solved by recursion/iteration, it must complete in a finite amount of time, i.e have a finite amount of recursions/iterations. Thus, I could technically just write those finite number of commands in a code, avoiding recursion. It'd be annoying, but it'd be possible. Thus I put true instead of false. Can anyone help with this???

OpenStudy (anonymous):

The question, by the way is: True or False, There exist problems that cannot be solved in Python without using either iteration or recursion.

OpenStudy (anonymous):

And the given explanation is "True. Otherwise the complexity of programs would be bound by the length of code"

OpenStudy (lopus):

is true because one programs start iterative (most efficient) and can transform in recursive (less code)

OpenStudy (anonymous):

the question is implying that there are problems that CAN be solved without using iteration and is asking if there are problems that can NOT be solved without iteration/recursion. in other words, are there problems that require iteration/recursion to solve them. can you add the numbers in a list without iteration? does adding the numbers in a list require iteration?

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!