Question #303165

Write a Python code that will read 5 numbers from the user. Your program should print the first number, the sum of the first 2 numbers, the sum of the first 3 numbers, and so on up to the sum of 5 numbers.




==========================================================




Sample Input 1:



1



2



3



4



5




Sample Output 1:



1



3



6



10



15

Expert's answer

sum = 0;
for _ in range(5):
  sum = sum + int(input())
  print(sum)
LATEST TUTORIALS
APPROVED BY CLIENTS