6.40.24 Sum of elements of a list: sum add
The sum command adds the elements of a list or sequence of
numbers.
add is a synonym for sum.
-
sum takes one argument:
L, a list or sequence of numbers.
- sum(L) returns the sum of the elements of L.
Example.
Input:
sum(2,3,4,5,6)
Output: