Q05 Python Question - 1% of final grade - Due July 10, 2022 Write a Python function that takes a list of numbers and ret
Posted: Tue Jul 05, 2022 10:19 am
Question - 1% of final grade - Due July 10, 2022 Write a Python function that takes a list of numbers and returns a list of cumulative sums of the negative numbers in the input list. Each number in the new list will be the sum of all the previous negative numbers plus the current number so long as the current number is negative; otherwise the number will be the sum of all the previous negative numbers. The input list [1, -2, 3, -4, 6] will return [0, -2, -2, -6, -6], for instance. def getCumulativeSum2 (inputList):
Q05 Python