Write a Python program that asks the user to enter a number N. Then calculate and print the sum of all natural numbers from 1 to N. The program must take N as input from the user.
Examples
Example 1
Input
1
Output
1
Explanation Sum of first 1 natural number is 1
Example 2
Input
5
Output
15
Explanation 1+2+3+4+5 = 15
Example 3
Input
10
Output
55
Explanation Sum of first 10 natural numbers is 55
Acceptance—
Accepted0
Submissions0
Auto-save
SavedLn 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
1
No results yet
Run your code to test it against the sample cases.