0

Hi guys I need your help with this python mission

No one likes homework, but your math teacher has given you an assignment to find the sum of the first N numbers. Let’s save some time by creating a program to do the calculation for you! Take a number N as input and output the sum of all numbers from 1 to N (including N). Sample Input 100 Sample Output 5050 Explanation: The sum of all numbers from 1 to 100 is equal to 5050.

27th Jun 2021, 12:33 AM
OUABI ABDESSAMAD
OUABI ABDESSAMAD - avatar
5 Antworten
+ 2
ᴩʟꜱ show your work that math teacher given you
27th Jun 2021, 1:07 AM
Sâñtôsh
Sâñtôsh - avatar
+ 1
Thank you so much bro
27th Jun 2021, 9:10 AM
OUABI ABDESSAMAD
OUABI ABDESSAMAD - avatar
0
But it's still not working
27th Jun 2021, 9:17 AM
OUABI ABDESSAMAD
OUABI ABDESSAMAD - avatar
0
Everything is good thank you
27th Jun 2021, 10:06 AM
OUABI ABDESSAMAD
OUABI ABDESSAMAD - avatar
0
Instead you can use n*(n+1)/2 formula
28th Jun 2021, 12:32 PM
Aathi Sankar