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
Write any four common hardware devices​
marishachu [46]

Answer:

Input devices: For raw data input.

Processing devices: To process raw data instructions into information.

Output devices: To disseminate data and information.

Storage devices: For data and information retention.

8 0
3 years ago
Can u please help me solve this
azamat

Alice has twice as many pencils as Cara. Leon has three more pencils than Alice. The three children have a total of 58 pencils.

<h3>What are the no. of pencils?</h3>

The no. of pencils are there totally as the 11.

Read more about the basic maths:

brainly.com/question/19493296

#SPJ1

4 0
2 years ago
In an agile process, story points are an absolute measurement, which differs from function points, as function points are relati
aleksandrvk [35]

Answer: True

Explanation: In an agile project, the story point are for the determination of the level of difficulty in the implementation of the story. They are accurate and also helps in the further improvement.They also help to reduce the time of plan because of being precise.

Function points work in accordance with the function and depends upon the relative measurements and functional size measurement which makes them less precise.Thus, the given statement is true.

6 0
3 years ago
Initialize the list short_names with strings 'Gus', 'Bob', and 'Zoe'. Sample output for the givenprogram:Gus Bob Zoeshort_names
Gnesinka [82]

Answer:

short_names = ['Gus', 'Bob','Zoe']

Explanation:

A list is a type of data structure in python that allows us to store variables  of different types. Each item in a list has an index value which must be a integer value, and the items can be assessed by stating the index position. The syntax for creating and initializing a list is:

list_name = [item1, item2,item3]

  1. The name of the list (must follow variable naming rules)
  2. a pair of square brackets
  3. items in the list separated by commas.

The python code below shows the implementation of the solution of the problem in the question:

<em>short_names = ['Gus', 'Bob','Zoe']</em>

<em>print(short_names[0])</em>

<em>print(short_names[1])</em>

<em>print(short_names[2])</em>

The output is:

<em>Gus</em>

<em>Bob</em>

<em>Zoe</em>

6 0
3 years ago
To get a sense of your digital footprint, you should: Question 2 options: Google yourself regularly, and monitor what your frien
masha68 [24]
Let us examine the given answers.

a) Google yourself regularly, and monitor what your friends post.
  Verdict: This answer is correct, but it is also necessary to look for yourself on other search engines.

b) Google yourself once a year
  Verdict: Once a year is better than doing nothing, but more than once a year is preferable.

c) Google yourself every five years.
  Verdict: The time interval is too long. Your reputation could easily be damaged, or your identity could be stolen in less than 5 years.

d) Delete all your accounts and start fresh.
   Verdict: This will not solve the problem of having your reputation damaged, or having your identity stolen. Information on the web is preserved ins storage vaults for long periods of time.

Answer: 
Google yourself regularly, and monitor what your friends post. Also, search for your name on other search engines.

3 0
4 years ago
Other questions:
  • What is last mile in VOIP
    13·1 answer
  • A computer with a frequency 2 GHZ and its average cycle per instruction is 2. what is the MIPS of the computer?
    6·1 answer
  • TRUE OR FALSE: If I ask you to span multiple rows in your table, that means that two columns will merge together
    5·1 answer
  • Jimmy wrote the procedure scoreToGrade which accepts as a parameter score - a quiz score in the range 0-100. The procedure is su
    8·1 answer
  • In object-oriented programming, the object encapsulates both the data and the functions that operate on the data.
    10·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    15·2 answers
  • Read two numbers from user input. Then, print the sum of those numbers. Hint - Copy/paste the following code, then just type cod
    9·1 answer
  • SOMEONE PLEASE HELP ME WITH THIS ILL GIVE YOU BRAINLY IF YOU GET IT RIGHT PLEASE!!!!!
    13·2 answers
  • Which item is developed last in the cyclical design process
    11·1 answer
  • Multiple Choice
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!