0
python beginner: lesson 30- sum of consecutive numbers
I don’t know how to do this one, pls lmk if you have done this thank you
2 Réponses
+ 1
Please show you attempt first
0
you can use the for or while loop, this requires an input, and a variable to store the sum.
#your code goes here
sum = 0
for n in range(N) :
sum += n
print(sum)