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
Nuetrik [128]
3 years ago
8

Given two lists of integers, write a function multLists(list1, list2) that multiplies each value of the list1 by the values of l

ist2 and returns list1 with it's updated values. The lists will be obtained for you, just write the function and print the result.
Computers and Technology
1 answer:
Fynjy0 [20]3 years ago
3 0

Answer:

FIRST SOLUTION

def multLists(list1,list2):

   for i in range(len(list1)):

       list1.append(list1[i]*list2[i])

   return list1

SECOND SOLUTION

def multLists(list1,list2):

   newlist = [ ]

   for i in range(len(list1)):

       newlist.append(list1[i]*list2[i])

   return newlist

Explanation:

First we define the function and call it MultLists. Then using a for statement, we loop through the list the number of times that is equivalent to the length of the list1. In the first solution, we append the element-wise multiplication in the two list and append this to list1. The return of the first solution, is list1 which contains list1 in addition to the product of the elements from list1 and list2

In the second solution, we create a new list, and using the append function, we populate it with the values of the element-wise multiplication from the two lists. The return of the second solution, is a new containing only to the product of the elements from list1 and list2

You might be interested in
Code the function definition for aNonclassFunction, picking up co. aNonclassFunction has no return value.
enot [183]

Answer:

b)void aNonclassFunction (Banana co);

Explanation:

In the function definition you have to pass the tell the function which type of argument it is taking.In our case we are taking a variable co of Banana type passing it to the function named aNonclassFunction having no return type.

So the definition will be like this.

void aNonclassFunction (Banana co);

6 0
3 years ago
What does Verizon child allow parents to do? My parents recently got the app and put it on my phone so I was wondering...
HACTEHA [7]
It allows them to turn on and turn off your internet; also if you were wondering incognito or any private browsing still countermeasures all devises they can use to access your history
4 0
3 years ago
Two DHCP servers, Server1 and Server2, are running Windows Server 2016. As the administrator, you create a scope called Scope1.
kumpel [21]

Answer:

The answer is "Option a"

Explanation:

Split-scope is also an easy and simple approach to deliver DHCP consistency and workload management into your system. Server 2008 R2 provides a convenient divide-scope guide which removes several operational efforts but can only be to use if all databases run on R2, and wrong choices can be described as follows:

  • In option b, It uses the Ip address for multicast, that's why it is wrong.
  • In option c, It is wrong because it uses a windows interface, that works on policies.  
  • In option d, It is wrong because it is an administrative feature.

5 0
3 years ago
To set up scenarios, you need to first use ______ to set up a list, then ______ to set up the reference cell. Last you need to u
Sholpan [36]

To set up scenarios, you need to first use Goal seek to set up a list, then data table  to set up the reference cell. Last you need to use  VLOOKUP to set up the cells that display the output results from the scenario.

<h3>What is a Goal Seek in Excel?</h3>

Microsoft Excel is known to have a goal seeking tool that is said to be built-in and it is one that gives room for the user to know the desired input value for any kind of  formula if the output value is said to be already known.

Hence, To set up scenarios, you need to first use Goal seek to set up a list, then data table  to set up the reference cell. Last you need to use  VLOOKUP to set up the cells that display the output results from the scenario.

See full question below

To set up scenarios, you need to first use to set up a list, then to set up the reference cell. Last you need to use to set up the cells that display the output results from the scenario. CHOOSE; VLOOKUP; data table Goal seek; data table; VLOOKUP Data validation; VLOOKUP; CHOOSE Data table; VLOOKUP;

Learn more about  VLOOKUP from

brainly.com/question/14042837

#SPJ1

6 0
2 years ago
A coworker asks your opinion about how to minimize ActiveX attacks while she browses the Internet using Internet Explorer. The c
iogann1982 [59]

Answer:

a. Security tab

Explanation:

These options would be under the security tab. The security tab allows you to protect yourself when browsing the web. It includes features such as cookies, location, pop-up blocker and tracking protection. This allows you to avoid harmful or malicious content. In this example, your coworker wants to minimize attacks when using the Internet. Therefore, this is the tab that would help her the most.

7 0
3 years ago
Other questions:
  • Which is true for a hosted blog software
    15·2 answers
  • What operating system was most commonly used by early personal computers? Apple Mac MS-DOS Windows
    6·2 answers
  • A password checking system that disallows user passwords that are proper names or words that are normally included in a dictiona
    15·1 answer
  • Given two ArrayLists of sorted strings (alphabetically ascending), write down a method to merge these sorted strings’ ArrayLists
    10·1 answer
  • Mercury Technical Solutions has been using SSL in a business-to-business environment for a number of years. Despite the fact tha
    5·1 answer
  • The array mycats is an 8 element array of type kitty that has already been declared and initialized. write the expression(s) in
    5·1 answer
  • What does a wholesaler do?
    12·1 answer
  • Giving Brainliest IFFF CORRECT
    9·1 answer
  • Scenario
    7·1 answer
  • _____________________________________________________is a pre-designed format to help users with the creation of a document, lik
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!