1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Butoxors [25]
3 years ago
8

Write a function statement() that takes as input a list of floating-point numbers, with positive numbers representing deposits t

o and negative numbers representing withdrawals from a bank account. Your function should return a list of two floating-point numbers, the first will be the sum of the deposits, and the second (a negative number) will be the sum of the withdrawals.
Computers and Technology
1 answer:
katrin2010 [14]3 years ago
5 0

Answer:

def statement(numbers):

   deposits = []

   withdrawals = []

   for number in numbers:

       if number > 0:

           deposits.append(number)

       if number < 0:

           withdrawals.append(number)

   

   return [sum(deposits), sum(withdrawals)]

Explanation:

*The code is in Python.

Create a function called statement that takes numbers as a parameter

Inside the function, create two empty lists called deposits and withdrawals. Create a for loop that iterates through the numbers. Inside the loop, if a number is greater than 0, add it to the deposits. If a number is smaller than 0, add it to the withdrawals. When the loop is done, return the sum of the deposits and the sum of the withdrawals (use sum function to sum the numbers in the lists)

You might be interested in
What other kinds of toolbars exist in addition to those that are part of individual programs?
Stells [14]
<span>A. toolbars that appear on the taskbar

</span><span>D. the process of allocating uses and resources for a server</span>
6 0
4 years ago
Question 10 of 10
AnnyKZ [126]

Answer:

Explanation:B.

just took the test

3 0
3 years ago
How can I use the internet/social media to protect my identity?
sattari [20]
Don't show your face and don't put your name or location online? i'm confused by this question.
3 0
3 years ago
Convert the following into binary system<br>and vice versa.<br>106​
notka56 [123]
It would be 1101010 in binary
4 0
3 years ago
Read 2 more answers
BestMed Medical Supplies Corporation sells medical and surgical products
ioda

Management  of the company should adopt a system for unified communications.

<h3>What is unified communications?</h3>

Unified Communications (UC) is a term that connote a kind of a phone system that uses or “unifies” a lot of communication methods within one or the same business.

Note the one's business can be able to communicates in a lot of ways such as  phone calls, video conferencing and as such, Best Med Medical Supplies Corporation  should be considered adopting a system for unified communications.

They should look into:

  • The level of productivity
  • Total costs
  • Compatibility with their business model
  • Productivity.

Learn more about communications from

brainly.com/question/26152499

#SPJ1

3 0
2 years ago
Other questions:
  • To add text into a SmartArt graphic, a user will need to _____.
    14·1 answer
  • Which of the following is true regarding a class and interface types? Group of answer choices You can convert from a class type
    9·1 answer
  • The process of converting an input file (stream of characters) into an understandable format is called syntax analysis.
    7·1 answer
  • What is the missing line?
    9·1 answer
  • To see the formula in a cell, look at the___
    5·1 answer
  • I need help, thank you
    5·1 answer
  • In a well-developed paragraph - using domain-specific vocabulary and academic writing - address the following writing prompt:
    12·1 answer
  • Can rank u r guys in rocket leagye
    13·1 answer
  • Python code for converting between minutes to seconds. For example 5 minutes= 300 seconds. please help me with this
    7·1 answer
  • Which graphic file format would you choose if you needed to make an animated graphic for a website?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!