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
lesya [120]
3 years ago
15

Write a new version (called map2) of the map function which operates on two lists. Your function should accept three parameters,

a function f and two lists X and Y , and return a new list composed of the function f applied to corresponding elements of X and Y . For concreteness, place the function first among the parameters, so that a call to the function appears as (map2 f X Y). Your function may assume that the two lists have the same length. In particular, given two lists (x1 x2 . . . xn ) and ( y1 y2 . . . yn ) (and the function f ), map2 should return
Computers and Technology
1 answer:
storchak [24]3 years ago
7 0

Answer:

def mapper( a, b ):

   return dict(zip(a,b))

def map2 ( f, x : list, y: list ) ->dictionary:

   mapped_lists = f( x, y )

   new_list = [ ]

   for key, value in mapped_lists.iteritems():

       items = [key,value]

       new_list.append(items)

   return new_list

result = map2( mapper, x, y )

print( result )

Explanation:

The "map2" python function defined above maps two lists of the same length. It receives two iterators or lists and a function and returns a list of mapped items from both lists.

You might be interested in
Which type of error is a random error
zlopas [31]

Answer:

statistical fluctuations

Explanation:

8 0
3 years ago
Read 2 more answers
Every command or instruction is called
Elza [17]

Answer:

statement........................

6 0
3 years ago
Read 2 more answers
The linux and macos program traceroute is known by a slightly different name on windows. it's referred to as ______.
kompoz [17]

The answer is 'tracert'. Tracert or traceroute command is a form of a diagnostic tool which allows you to capture information as the packet is sent from the source and destination providing the route taken and measure of delay across the IP network.

7 0
3 years ago
Analizar los componentes de una computadora completa hoy en día comparada con el inicio de la Informática.
scZoUnD [109]

Answer:

Explanation:

Las computadoras que existian en el inicio de la informatica y las que existen ahora tenian los mismos componentes. Estos eran CPU, Placa Madre, RAM, HDD, y tarjeta grafica. Lo que si cambio fueron el velocidad y capacidad. Por ejemplo, en el inicio las Tarjetas de RAM venian como DDR a una velocidad maxima de 133 Mhz con una capacidad de entre 4mb y 8mb. Hoy en dia tenes RAM de DDR5 con una velocidad de 4400 Mhz y de 8gb. Mientras que avanzaba el tiempo los componentes de las computadoras aumentaban en velocidad y capacidad aunque el tamaño bajaba o aumentaba dependiendo del gusto del usario.

8 0
3 years ago
Cloud computing service providers manage different computing resources based on the services they offer. Which resources do IaaS
eimsori [14]

Answer:

1. C.operating system

2. A.applications

Explanation:

1. The Iaas is the infrastructure as a service, and storage, server, and network are the infrastructures. However, the Operating System is the platform, and hence it is the correct option for the first blank. We need to understand the exact meaning of the IaaS, PaaS and the SaaS as well as MaaS, to better understand cloud computing.

2. In the second case, we have been asked about the option that is not being covered by the PaaS, and Paas stands for the platform as a service. And the interface, storage, and virtualization is the platform whereas the Applications is an example of software. And it is being managed by SaaS, Hence, the correct option is A. Applications.

7 0
3 years ago
Other questions:
  • Is bit stuffing necessary in the control or address field in theHDLC protocol? why?
    13·1 answer
  • Interest rate risks would be most relevant to what purchase?
    7·2 answers
  • What is the answer and why?
    12·1 answer
  • Someone asks you for help with a computer that hangs at odd times. You turn it on and work for about 15 minutes, and then the co
    7·1 answer
  • What are the features of Cobol language that make it suitable for programming business applications.
    6·1 answer
  • Please someone helpp
    12·2 answers
  • Which of the following file formats cannot be imported using Get & Transform?
    6·1 answer
  • Please please help I don’t understand this
    6·1 answer
  • I need some help-
    15·1 answer
  • What feature should you enable to prevent the sidhistory attribute from being used to falsely gain administrative privileges in
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!