+ 1

Sum of cunsecutive numbers

Can someone solve this

8th Jan 2023, 6:50 AM
EXPERIMENT WORLD
EXPERIMENT WORLD - avatar
3 Respostas
+ 5
Hint: this is possible with using a loop or a math formula.
8th Jan 2023, 8:42 AM
JaScript
JaScript - avatar
+ 3
Attempts?
8th Jan 2023, 8:28 AM
A͢J
A͢J - avatar
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)
28th Mar 2023, 4:38 AM
Exiled Penguin 🐧
Exiled Penguin 🐧 - avatar