Closed kedarmhaswade closed 1 month ago
List is a versatile and ubiquitous data structure. It represents a sequence. A list could be homogeneous or heterogeneous.
Consider a homogeneous list of numbers. Write a function that returns the sum all the elements of a given list.
For extra credit, use the same function to sum all the numbers between 1 and 100 (inclusive).
Cool!
List is a versatile and ubiquitous data structure. It represents a sequence. A list could be homogeneous or heterogeneous.
Consider a homogeneous list of numbers. Write a function that returns the sum all the elements of a given list.