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
den301095 [7]
2 years ago
14

Write a function called sum_arrays that takes two lists of the same length and returns a list where each element is the sum of t

he elements at that index in the original list. The function should return the empty list if the parameters are not the same size.
Computers and Technology
1 answer:
Alekssandra [29.7K]2 years ago
5 0

The function that calls sum_arrays and takes two lists of the same length and returns a list where each element is the sum of the elements at that index in the original list is as follows:

def  sum_arrays(list1, list2):

    if len(list1)==len(list2):

         return [sum(i) for i in zip(list1, list2)]

    else:

         return []

print(sum_arrays( [1, 3, 4, 6, 0], [4, 5, 6, 2, 10]))

<h3>Code Explanation:</h3>

The code is written in python.

  • A function named sum_arrays is declared with its arguments as list1 and list2.
  • We use the if statement to check if the two list are equal in length.
  • If they are equal in length, we add the two list
  • Else we will return an empty list
  • Finally, we call the function with its arguments.  

learn more on function here:brainly.com/question/25589100?referrer=searchResults

You might be interested in
What web 2.0 features allows users to subscribe to a data plan that charges for the amount of time spent on the internet?
galina1969 [7]

Answer:

The answer to this question is given in the explanation section. The correct option is long tail

Explanation:

a.Folksonomy

Folksonomy is a way of organizing data and digital content. With Web 2.0, users can collaboratively manage and tag photos, journals and other media. As more users do this, creates a system of classification for the media and information.  so this option is not correct

b. long tail (correct option)

Some sites are able to offer services as well in which users can subscribe monthly or pay a fee every so often. An example of this would be Netflix.

c.user participation

All users have the free will to contribute to the site which makes many Web 2.0 pages public. With sites such as Wikipedia, anyone is open to the editing of articles. Information is provided two-way instead of solely from the site owner.

d.application

Web 2.0 applications that allow anyone to create and share online information or material they have created. As you know that there are number of different types of web 2.0 applications including wikis, blogs, social networking, folksonomies, podcasting & content hosting services.

3 0
3 years ago
Drivers dealing with strong emotions may take risks they otherwise would not. <br> true false
grigory [225]

This is true because some people may be going through rough times and when they aren't they probably won't feel the same way as they do when they go through tough times.

7 0
3 years ago
What is the purpose of a mail merge field?
Alex73 [517]

Answer:

to set up placeholders in a document where data will be inserted

4 0
4 years ago
Read 2 more answers
A presentation on the history of the Internet would mostlikely use the ____ pattern of organizationSpatialproblem-solutionchrono
m_a_m_a [10]

Answer:

topical

Explanation:

A presentation on the history of the Internet would mostlikely use the topical  pattern of organization.

3 0
3 years ago
An investigator obtains consent and HIPAA authorization from subjects to review their medical records and HIV status. He plans t
matrenka [14]

Answer:D. A HIPAA violation

Explanation:

The Health Insurance Portability and Accountability Act of 1996 is a legislation that was designed to protect or safeguard medical records of patients, to eliminate and prevent healthcare fraud and protect health care coverage of employees .

It helps to ensure that patients' information remains private and their record are secured.

The updated rules of this act includes the HIPAA Privacy Rule, HIPAA Security Rule, HIPAA Omnibus Rule, and the HIPAA Breach Notification Rule.

A HIPAA violation is a failure to comply with any aspect of HIPAA standards and provisions and in this case it was theft of records; he should have ensured that the computer is placed in a secured place or the information is locked even when the computer get stolen.

7 0
4 years ago
Other questions:
  • What technological innovation was the key factor driving the booming economy?
    8·1 answer
  • "the file that specifies how netbeans builds and deploys the application when you run the application is called the ____________
    8·1 answer
  • One purpose of the dual ignition system on an aircraft engine is to provide for?
    7·2 answers
  • Amazon Web Services (AWS): Group of answer choices a) forms a majority percentage of Amazon's overall revenue. b) was introduced
    15·1 answer
  • When you collaborate or meet with a person or group online, it is called
    12·2 answers
  • A computer has the following parameters Operation Frequency Cycles Arithmetic/Logical instructions 65% 1 Register load operation
    11·1 answer
  • What is a disadvantage of shopping online?A.Harder to compare prices than in storesB.A higher risk of financial data theftC.More
    6·2 answers
  • A ____ is a statement specifying the condition(s) that must be true before the function is called.
    6·1 answer
  • What is the code for this please?​
    13·1 answer
  • What is the purpose of installing updates on your computer?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!