# Given two lists of integers, write a function multLists(list1, list2) that multiplies each value of the list1 by the values of list2 and returns list1 with it's updated values. The lists will be obtained for you, just write the function and print the result.

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

## Related Questions

What are some benefits of the Internet? (select all that apply)

It’s helps you Check things
It keeps you updated

A. ease of communication

B. email

C. collaboration

Explanation:

:)

An application ________ is anyone who writes a computer application for one or more platforms.

An Application Programmer

Explanation:

A Programmer is a professional who writes applications for the computer on a platform.

Which windows utility should you use to organize the files on your disk to improve efficiency?