I have just been studying the concept of recursion and I thought that I would try a simple example. In the following code, I am attempting to take the numbers: 1, 2, 3, 4, 5, an
Try this code:
def sumr(n): if n==0: return n return n+sumr(n-1)