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

5th Oct 2021, 5:00 AM
slick
slick - avatar
2 Réponses
+ 1
Please show you attempt first
5th Oct 2021, 6:26 AM
Kamil Hamid
Kamil Hamid - avatar
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)
5th Oct 2021, 7:46 AM
Erlénio.RS
Erlénio.RS - avatar