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]
2 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]2 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
Which routing protocol does an exterior router use to collect data to build its routing tables?
natita [175]

Answer:

D. BGP

Explanation:

In order to exchange routing information with another AS (Autonomous Systems) only, exterior routers use an exterior routing protocol, like BGP (Border Gateway Protocol) or EGP (Exterior Routing Protocol).

BGP is an application-layer protocol in the TCP/IP suite, that uses a well-known TCP port (179) in order to deliver information reliably.

It is important to note that in order to exchange routing data within his own AS, the router uses an interior routing protocol, like OSPF.

3 0
3 years ago
Suppose Client A initiates a Telnet session with Server S. At about the same time, Client B also initiates a Telnet session with
Shtirlitz [24]

Answer:

Explanation:

From the given information;

We will like you to understand that the source port numbers and destination port number can be any number. For that reason, the ones being used here will just be examples.

NOTE:

That the destination port numbers sent from A to S and B to S are the same in their segments.

That the destination port numbers sent from S to A and S to B are the same in their segments.

From A to S, the segment sent possibly could have the source port number 467 and destination port number as 23(Telnet)

From B to S, the segment sent possibly could have the source port number 513 and destination port number as 23(Telnet).

From S to A, the segment sent possibly could have the source port number as 23(Telnet) and destination port number as 467.

From S to B, the segment sent possibly could have the source port number as 23(Telnet) and destination port number as 513.

Yes, it is possible. This is because the inclusion of  IP in the segments is to recognize the host.

No, the source ports will be different. Because source port number from A to S can't be the same from B to S at the time they are in the same host.

7 0
2 years ago
__________ has become a widely accepted evaluation standard for training and education related to the security of information sy
kirill115 [55]
NSTISSI NO 4011 has become a widely accepted evaluation standard for training and education related to the security of information system. The standard is directed at information security professionals who are experts in identifying system vulnerabilities, investigating system security, documenting, analyzing and evaluating system security technology policies.<span />
4 0
2 years ago
A new attack involves hacking into medical records and then offering these records for sale on the black market. A medical recor
Flura [38]

Answer:

1. Control Activities

2. Internal

Explanation:

Considering the scenario explained in the question, it can be concluded that This is an IT application of the COSO principle of CONTROL ACTIVITIES and evidence PREVENTIVE controls.

In this case, the Control Activities which is one of the five principles of COSO (Committee of Sponsoring Organizations of the Treadway Commission) is a means of selecting and developing general control over technology, through strategies and techniques. This is what the medical records company did by building controls into its systems to prevent hackers from accessing its system.

This is an example of internal CONTROL ACTIVITIES that illustrates PREVENTIVE control against potential risks or hacks.

8 0
3 years ago
Data that are collected on large populations of individuals and stored in databases are referred to as _____.
xz_007 [3.2K]
The answer is statistics
4 0
2 years ago
Other questions:
  • You should use _____ software for writing a letter.
    10·1 answer
  • What is the last step in planning your budget
    11·1 answer
  • Part 1 Given 3 integers, output their average and their product, using integer arithmetic. Ex: If the input is 10 20 5, the outp
    6·1 answer
  • You are required to copy in your attendees' emails from outside of Outlook when creating a meeting
    6·2 answers
  • Which of the following is the BEST reason to use cash for making purchases? everfi
    15·1 answer
  • What are the characteristics of calendar sharing options in Outlook 2016? Check all that apply.
    13·2 answers
  • A summer camp offers a morning session and an afternoon session. The list morningList contains the names of all children attendi
    6·1 answer
  • What is the value of x after running this code?
    13·2 answers
  • Colorful bead bracelet in codehs
    14·1 answer
  • Digital communication and production chapter 17
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!