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
Where do you go to view and access important info about your document all in one location
kumpel [21]
The place you go to view and access important info about your document would be in the menu bar.
6 0
3 years ago
write the tool used for magnification of image,move a selection,select a rectangular or elliptical area of the image, draw diffe
Gelneren [198K]

A compound microscope uses multiple lenses to magnify an image for an observer. It is made of two convex lenses: the first, the ocular lens, is close to the eye; the second is the objective lens. Compound microscopes are much larger, heavier and more expensive than simple microscopes because of the multiple lenses.

7 0
3 years ago
When on a LAN switch DHCP snooping is configured the networks that can be accessed by which clients?
kompoz [17]

Answer:

The network is accesible just for the whitelisted clients configured in the switch connected to the DHCP server

Explanation:

DHCP snooping main task is to prevent an unauthorized DHCP server from entering the our network.

Basically, in the switch we define the ports on which the traffic of the reliable DHCP server can travel. That is, we define as “trust” the ports where we have DHCP servers, DHCP relays and trunks between the switches.

8 0
4 years ago
Do you think YouTube is an effective social media platform for professionals? Why or why not?
Tomtit [17]
Yes because if someone needs help with someone they could just look for a professionals to see what to do and all that stuff

You will get the picture
6 0
4 years ago
If you did not want the header to appear on the first page of a document but you do want it on all the other pages,
Alinara [238K]

Answer:

I would go to google doc

4 0
3 years ago
Other questions:
  • You can undo up to the most recent 40 actions by clicking the undo button.
    9·1 answer
  • What kind of operating system is Windows? Command-line Browser based Graphical user interface Linux-based
    10·2 answers
  • Two technicians are explaining automotive computer control. Technician A says that the volt is used as a signal for a computer-c
    13·2 answers
  • Use a while loop to repeatedly take input from the user and calculate a sum. The user will only be allowed to type in numbers, b
    15·1 answer
  • A dog walks 10 km north in 2 hours and then 8 km south in 1 hour.
    10·1 answer
  • What typed of google group is best-suited for an online study group?
    7·1 answer
  • If(moreDate == true)
    7·1 answer
  • What do GUI use except​
    10·1 answer
  • You are creating a mobile version of a community discussion site for busy moms. Users post questions and other topics for discus
    10·1 answer
  • 9) Which date is assigned the serial number of 1?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!