LearnPy Hub
← Loops problems
Easy

Sum from 1 to N

Print the sum 1 + 2 + … + N using a loop.

Input

One integer N ≥ 1.

Output

The sum.

Sample 1

Input
5
Output
15

Sample 2

Input
1
Output
1
solution.py
Output appears here
Hints
Sum from 1 to N · Python practice problem · LearnPy Hub