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
konstantin123 [22]
3 years ago
8

Implement the function couple, which takes in two lists and returns a list that contains lists with i-th elements of two sequenc

es coupled together. You can assume the lengths of two sequences are the same. Try using a list comprehension.
Computers and Technology
1 answer:
In-s [12.5K]3 years ago
7 0

Answer:

couple.py

def couple(s1,s2):

  newlist = []

  for i in range(len(s1)):

      newlist.append([s1[i],s2[i]])

  return newlist

s1=[1,2,3]

s2=[4,5,6]

print(couple(s1,s2))

enum.py

def couple(s1,s2):

  newlist = []

  for i in range(len(s1)):

      newlist.append([s1[i],s2[i]])

  return newlist

def enumerate(s,start=0):

  number_Array=[ i for i in range(start,start+len(s))]

  return couple(number_Array,s)

s=[6,1,'a']

print(enumerate(s))

print(enumerate('five',5))

Explanation:

You might be interested in
A group of 8 bits is called a... <br> A. hunch <br> B. byte <br> C. dozen <br> D. snack
Mama L [17]
I think that it's called a byte.
5 0
3 years ago
Read 2 more answers
Write an if/else statement that assigns 0 to x when y is equal to 10; otherwise it should assign
Liono4ka [1.6K]

Answer:

if(y==10)

{

     x=0;   // assigning 0 to x if y equals 10.

}

else

{

   x=1;   // assigning 1 to x otherwise.

}

Explanation:

In the if statement i have used equal operator == which returns true if value to it's right is equal to value to it's left otherwise false.By using this operator checking value of y and if it is 10 assigning 0 to x and if it is false assigning 1 to x.

7 0
2 years ago
1.1 Why is primary goal of software development now shifting from
lidiya [134]

is where the term ‘App’ comes from. It is any piece of software that allows us to actually ‘use’ the computer. For example, it may be a word processor, web browser, spreadsheet software or even just a game. Application software relates to the user rather than the hardware

5 0
3 years ago
Which of the following solutions should an administrator use to reduce the risk from an unknown vulnerability in a third-party s
ser-zykov [4K]

Answer:

A. Sandboxing

Explanation:

The best solution to apply for this task would be Sandboxing. This is a software management strategy that isolates applications from critical system resources and other programs. In doing so you effectively add a secondary security layer on top of the application in order to prevent any and all malware from entering and damaging your overall system. Thus effectively reducing the risk.

4 0
3 years ago
Which of the following file formats allows you to share and save documents
mariarad [96]
OPTION A would be the answer
7 0
2 years ago
Other questions:
  • How can i save a word 2016 document as a word 2016 document?
    6·1 answer
  • When you start to type =av, what feature displays a list of functions and defined names?
    11·1 answer
  • Which of the following is the net effect of the following combination of share and NTFS permissions when the share is accessed o
    7·1 answer
  • What lets you do many things, like write book reports and stories?
    5·1 answer
  • What are the methods of identifying publicly switched networks?
    14·1 answer
  • (01.05 LC)
    7·2 answers
  • Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (a
    14·1 answer
  • How can you remove background noise from a video?
    15·2 answers
  • Create a simple JavaScript calculator.
    5·1 answer
  • To optimize the flow of data into and out of the cpu, the modern mcc provides at least _______________ of data every time the cp
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!