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
When you are saving a file, what does word suggest by default as the name of the document?
LenaWriter [7]
Whatever you have written on the page is what it'll name it.
5 0
3 years ago
Read 2 more answers
What is a PivotTable?
professor190 [17]

Answer:

d

Explanation:

6 0
3 years ago
Read 2 more answers
A user reports his or her computer is slow to boot. You check the boot order and determine that the computer is checking the C d
Nata [24]
You could turn off memory testing, but defragmentating and running chkdsk on C: would be better to try first.
6 0
3 years ago
How many of yall are willing to subscribe to my channel called "Space Juice" with around 248 subs?!​
Alborosie

Answer:me 148

Explanation:

5 0
3 years ago
Read 2 more answers
When planning a comprehensive security system, the first step is designing _____, which use a combination of hardware and softwa
Brums [2.3K]

Answer:

Fault tolerant system

Explanation:

Fault tolerance is the property that keeps a system operating properly in the event of a failure of one of the components within the system

A fault tolerant system enables the system to continue its operation possibly at a reduced level, rather than having the whole system breakdown.

A good security expert understands the need for fault tolerance in a comprehensive security system, as the absence of this can lead to serious security breaches once the whole system is down.

6 0
3 years ago
Other questions:
  • True or false? It is just too challenging to have different password for every
    12·1 answer
  • Which of these statements is true?
    9·1 answer
  • PLS HELP!!
    13·1 answer
  • "what type of index has an index key value that points to a data row, which contains the key value? "
    9·1 answer
  • Define stubs for the functions called by the below main(). Each stub should print "FIXME: Finish FunctionName()" followed by a n
    7·1 answer
  • Someone who wants to learn a skilled trade on the job should consider
    6·2 answers
  • Write a calculator program using a switch statement that: a) Prompts the user to enter two numbers b) Prompts the user to select
    6·1 answer
  • Which is not one of the four criteria for proving the correctness of a logical pretest loop construct of the form: while B do S
    14·1 answer
  • How much do you think it would cost to develop an app?
    14·2 answers
  • Write A Code In Python
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!