Advanced World Solutions, Inc. processes sequential measurement values in memory. Given an array of integers, traverse the array from left to right and return the sum of every element.
Each element must be included exactly once. The array may contain positive numbers, negative numbers, and zero. Do not modify the input array.
Implement sum_array(nums).
nums, a list of integers.nums.0 through index len(nums) - 1.def sum_array(nums):