Skip to content
C

Problem 1: Sum of a List

Easypython

Problem Description

Write a Python program that calculates and prints the sum of all numbers in a given list, using a loop.

Input

A list of integers.

Output

A single number: the sum of all elements.

Constraints

  • The list will contain between 1 and 100 integers.

Example Input

text
[4, 8, 15, 16, 23]

Example Output

text
Sum: 66

Concepts Covered

Lists, for loops, variable accumulation.

Input (stdin)

Output

Run your code to see output here...