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
Anna71 [15]
3 years ago
8

5. Write a function that takes two lists of integers and returns a list containing tuples with corresponding elements from both

the lists. For example - f ([1, 2, 3], [4, 5, 6]) -> [(1, 4), (1,5), (1,6), (2, 4), (2, 5), (2, 6), (3, 4), (3 ,5), (3, 6)]. If either list is null, the result is null. The lists do not have to be the same length.
Computers and Technology
1 answer:
Allisa [31]3 years ago
7 0

Answer:

def corresponding_of_lists(lst1, lst2):

   c = ""

   corresponding_list = []

   if (lst1 is None) or (lst2 is None):

       return None

   else:

       for i in lst1:

           for j in lst2:

               c = "(" + str(i) + "," + str(j) + ")"

               corresponding_list.append(c)

   return corresponding_list

Explanation:

- Create a function called corresponding_of_lists that takes two lists as parameter

- Initialize an empty list to hold the corresponding values

- Check if any of the lists are null, if they are return None

- Otherwise, get the corresponding elements and put them into the corresponding_list

Return the corresponding_list

You might be interested in
What span of dates best represents the Romantic era?
Black_prince [1.1K]
Romantic Era takes place from 1800 to 1850.

The movement is called Romanticism which takes place in the 18th Century in Europe. In this era, emotion and individualism, as well as the glorification of all the past and nature and emphasized. Medieval is also much preferred  than classical.
5 0
3 years ago
Read 2 more answers
Please help can’t get a bad grade!
SOVA2 [1]

Answer:

Algorithms are a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

Pseudo code is an informal description of an algorithm or how a program will function.

a. An example of an algorithm using coding terminology would be a function to find the largest or smallest number in a user-defined array.

b. A function that could include an algorithm would be a function that compares input.

c. Pseudo code could be used to outline a part of a program that has to carry out a specific function.

I hope that helped! If you have any questions I am glad to help.

5 0
3 years ago
A specific packet journey, from your computer to a remote server, end-to-end across multiple networks, has the following link ba
MrRa [10]

Answer:

0.125 seconds

Explanation:

The formula for the time taken to transfer the file is = file size / bandwidth

Assuming the computer and server could only transfer data at the speed of 1000 Mbps or more, The time of transmission is;

= 125 MB / 1000 Mbps = 0.125 seconds.

3 0
3 years ago
Develop a multithreaded app that can find the integer in the range 1 to 10000 that has the largest number of divisors. It should
skelet666 [1.2K]

Answer:

its not letting me Write out the code so here are screenshots

Explanation:

5 0
4 years ago
Can anyone give me Nitro type gold please? My NT account is trapkaybee061307
Rasek [7]

Answer:

no

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • When a chart is selected, numerous customization options can be found on which Chart Tools tabs?
    11·2 answers
  • List five characteristics of a series circuit
    9·1 answer
  • How can rows be added to a table? Check all that apply
    13·2 answers
  • Which of the following is a component of slides
    10·1 answer
  • Which of the following is an upper body workout
    6·2 answers
  • Which activity represents a violation of the licensing agreement?
    13·2 answers
  • Omnvmjsjskskskajskskzksososjfnjcjckskqnd
    10·1 answer
  • Kathi, the owner of Klothes for Kats, is excited about the launch of her first Local Catalog ad. She remembers there are a few d
    6·1 answer
  • What's the function of a cyclebin​
    14·1 answer
  • Identify suitable hardware components that will meet your requirements. Be reasonably specific. For example:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!