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
Some email programs let you use a ____ to move incoming mail to a specific folder or to delete it automatically based on the con
KatRina [158]

Answer:

filter

Explanation:

Some email programs let you use a filter to move incoming mail to a specific folder or to delete it automatically based on the content of the message.​

The filter performs this role by either automatically deleting or moving to another location.

Most messages that are moved or deleted are unsolicited emails or spam messages.

Filtering of your mails helps so you ou can manage your incoming mail using filters to send email to a label, or archive, delete, star, or automatically forward your mail.

This is a way of organising your correspondence.

6 0
3 years ago
Match the order in which you should develop a plan:
Advocard [28]

Develop

Present

Approve

Brainliiest please?

4 0
2 years ago
Look at the picture lol
andrey2020 [161]

Answer:

Zoom in more please and than i can help

Explanation:

6 0
2 years ago
Read 2 more answers
Game design is iterative. What does this mean?
Furkat [3]

Answer:  

What does Iterative Game Design mean?

Iterative game design is the process by which a video game is repeatedly proposed, prototyped, play tested and reevaluated prior to working product release. Iterative game design operates on the following principle: It is unrealistic to create an ideal product on the first try.

By creating and testing working models on core criteria (such as fun), game designers are able to refine product on a gradual basis and increase market success potential.

3 0
3 years ago
Suppose as a computer programmer, you have been assigned a task to develop a program to store the sorted data in ascending order
patriot [66]

Answer: i dont know but have an great day

Explanation:

5 0
2 years ago
Other questions:
  • How can we set the color of a text that acts as a link in a web page​
    10·2 answers
  • Angle, oblique, regular, demi, roman, heavy, extra bold, expanded, and compressed are ___________ . Select one: A. type styles B
    10·1 answer
  • How can you remove heat from a computer?
    10·1 answer
  • Write a paragraph on the following topic.
    14·1 answer
  • Baking Cookies. Sweet Dough Inc. bakes cookies—a popular dessert—based on the quantities ordered by their customers. Three raw m
    12·1 answer
  • after clicking the start button on your computer screen desktop what option would you then select to examines system components
    8·1 answer
  • What is the CSS property used to style text as all lowercase or uppercase?
    14·2 answers
  • Free points,
    15·2 answers
  • 1) "Information systems are revolutionizing the way businesses function in the 21st century," Do you agree or disagree with this
    5·1 answer
  • This seems like a good time to ask the basic question, “How’s it going in class?” Feel free to offer constructive feedback about
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!