0
Sum of consecutive numbers in python for beginners can someone please help and explain how to do it please
5 Respostas
+ 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..
+ 1
Yes please use the search bar and post your attempt as suggested above.
Some hint:
Use Fibonacci series
+ 1
5(n) consecutive numbers start from 1(m):
1+2+3+4+5=?
0
Hi! do you have any ideas about this?
0
Thank you so much