Sum of Natural Numbers in Python

Sum of Natural Numbers in Python

Here  you will learn the source code to find the sum of natural numbers in python programming.

 

Natural Number : A natural number is a whole number greater than zero, such as 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, etc.

 

Sum of Natural Numbers Formula

Sum of Natural Numbers in Python

 

 

Program Code to find Sum of Natural Numbers in Python

Output

Enter a number : 9
The sum is 45

 

 

Check out our other Python Programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top