Python Program to Find Sum of Natural Numbers Using Recursion

To understand this example, you should have the knowledge of the following Python programming topics:


In the program below, we've used a recursive function recur_sum() to compute the sum up to the given number.

Source Code

Output

The sum is 136

Note: To test the program for another number, change the value of num.