Recursion is a method of solving problems that involves breaking a problem down into smaller and smaller sub problems until you get to a small enough problem that it can be solved trivially. Usually recursion involves a function calling itself.
to calculate the sum of a list of numbers such as: [1,3,5,7,9]
theSum = 0
for i in numList:
theSum = theSum + i
Hope this will help you
May 23rd, 2015
Did you know? You can earn $20 for every friend you invite to Studypool!