0

Sum of consecutive numbers in python for beginners can someone please help and explain how to do it please

26th Apr 2021, 10:10 PM
Kyle
Kyle - avatar
5 odpowiedzi
+ 1
First thing, you should be aware of what consecutive numbers are..!! For ex, if 'n' is an integer then (n+1),(n+2) will be the next two integers.. Second, you need to be aware of the formula that we use to calculate the sum of consecutive numbers. In case if you don't know the formula, try using "for" or "while" loops to achieve the result... FORMULA : (n/2)(first_number + last_number) Now, try to code it!! If you still stuck anywhere, then post it here..
27th Apr 2021, 2:43 AM
sarada lakshmi
sarada lakshmi - avatar
+ 1
Yes please use the search bar and post your attempt as suggested above. Some hint: Use Fibonacci series
27th Apr 2021, 1:36 AM
Aditya
Aditya - avatar
+ 1
5(n) consecutive numbers start from 1(m): 1+2+3+4+5=?
27th Apr 2021, 10:21 AM
Shadoff
Shadoff - avatar
0
Hi! do you have any ideas about this?
26th Apr 2021, 10:23 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Thank you so much
27th Apr 2021, 11:33 PM
Kyle
Kyle - avatar