+ 1

# Sum of cunsecutive numbers

Can someone solve this

3 Answers

+ 5

Hint: this is possible with using a loop or a math formula.

+ 3

Attempts?

0

print(sum(list(range(1,int(input())+1))))
so its like this:
N = int(input())
R = range(1,N+1)
L = list(R)
sum = 0;
for x in L:
sum+=x
print(sum)