Question: Write a function balances ( lst ) to track financial transactions. The function takes in a list of positive and negative floats representing financial transactions.
Write a function balanceslst to track financial transactions. The function takes in a list of positive and negative floats representing financial transactions. Positive numbers represent donations, and negative numbers represent expenditures. The function should return a list of two floats where the first number represents the sum total of all donations and the second number should represent the sum of all expenditures.Write a function balanceslst to track financial transactions. The function takes in a list of positive and negative floats representing financial transactions. Positive numbers represent donations, and negative numbers represent expenditures. The function should return a list of two floats where the first number represents the sum total of all donations and the second number should represent the sum of all expenditures.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
