← Back to challenges

Get the Sum of All List Elements

PythonMediumarrayslanguage_fundamentalsmathnumbers

Instructions

Create a function that takes a list and returns the sum of all numbers in the list.

Examples

get_sum_of_elements([2, 7, 4]) ➞ 13

get_sum_of_elements([45, 3, 0]) ➞ 48

get_sum_of_elements([-2, 84, 23]) ➞ 105

Notes

N/A

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Frames Per Second