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
bearhunter [10]
4 years ago
12

Given the lists list1 and list2 that are of the same length, create a new list consisting of the first element of list1 followed

by the first element of list2, followed by the second element of list1, followed by the second element of list2, and so on (in other words the new list should consist of alternating elements of list1 and list2). For example, if list1 contained [1, 2, 3] and list2 contained [4, 5, 6], then the new list should contain [1, 4, 2, 5, 3, 6]. Associate the new list with the variable list3.
Computers and Technology
2 answers:
Ne4ueva [31]4 years ago
5 0

Answer:

Explanation:

idk

Papessa [141]4 years ago
4 0

Answer:

Below are the program in python language:

Explanation:

list1=[1,2,3]#first list which holds the numbers.

list2=[4,5,6]#second list which holds the numbers.

list3=[]#third list which is declared.

for (x,y) in zip(list1,list2):#for loop which tranverse the both list.

   list3.append(x)#append the first list element.

   list3.append(y)#append the second list element.

#end the body of the for loop.

Output:

  • The above code assigns the value in the list3 variable in the scenario, on which the question demands.

Code Explantion:

  • The above code is in python language, in which there are two lists in which value can be changed by the user.
  • There is a for loop which scans both the list and appends both list items on the third list like one element from the first list and the other element from the second list.

You might be interested in
The text size can be found in ?
Greeley [361]

Answer:

Microsoft word.

Explanation:

i am very sorry if the answer is wrong

3 0
3 years ago
Develop a C# console application that will determine the gross pay for each of three employees. The company pays straight time f
I am Lyosha [343]

Answer:

The c# program for the scenario is shown.

using System;

class main {

 static void Main() {

   

// arrays to hold details of employees are declared

// double datatype is taken to accommodate all types of numerical values  

     int[] empid = new int[3];

     double[] hours = new double[3];

     double[] pay = new double[3];

     double[] pay_overtime = new double[3];

     double hrs = 40.00;

     double[] total_pay = new double[3];

     

   Console.WriteLine("Enter the details for the three employees ");

// variable declared and initialized for the loop    

   int i=0;

   while(i<3)

   {

       Console.WriteLine("Enter the id");

       empid[i] = Convert.ToInt32(Console.ReadLine());  

       

       Console.WriteLine("Enter the working hours");

       hours[i] = Double.Parse(Console.ReadLine());

       

       Console.WriteLine("Enter the hourly pay");

       pay[i] = Double.Parse(Console.ReadLine());

       pay_overtime[i] = pay[i]*1.5;

       

       i++;

       

   }

   

   Console.WriteLine("The details for the three employees ");

   // variable set to 0 to be re-used in the loop

   i=0;

   

   while(i<3)

   {

       if(hours[i] > hrs)

           total_pay[i] = ( hrs*pay[i] );

       else

           total_pay[i] = ( hours[i]*pay[i] );

       

       if(hours[i] > hrs)

           total_pay[i] = total_pay[i] + ( (hours[i]-hrs)*pay_overtime[i] );

       

       i++;

       

   }

// variable set to 0 to be re-used in the loop

   i=0;

   

   while(i<3)

   {

       Console.WriteLine("Gross pay of employee " + (i+1) + " : " + total_pay[i] );

   

       i++;

   }

   

   

 }

}  

OUTPUT

Enter the details for the three employees  

Enter the id

1

Enter the working hours

35

Enter the hourly pay

10

Enter the id

2

Enter the working hours

40

Enter the hourly pay

10

Enter the id

3

Enter the working hours

45

Enter the hourly pay

10

The details for the three employees  

Gross pay of employee 1 : 350

Gross pay of employee 2 : 400

Gross pay of employee 3 : 475  

Explanation:

The program works as described.

1. Arrays to hold each piece of information for the employee, employee number, hourly pay, overtime pay and hours worked, are declared.

2. User input is taken inside while loop to fill each array for each employee.

3. The total gross pay for each employee is calculated inside another while loop.

4. The last while loop is used to display the gross pay for each employee.

3 0
3 years ago
Many web browsers include _________ tools to make it easier for designers to locate the source of a style that has been applied
nordsb [41]

Answer:

c. developer

Explanation:

DEVELOPER TOOLS are tools that enables designers to easily and quickly edit web page and as well diagnosed issues or problem on a website which will inturn enables them to build a great and better websites without stress reason been that when a designer makes use of DEVELOPER TOOLS they can quicky track down and as well fix the problem that was diagnosed within a minute or seconds thereby saving time when developing a website profile.

8 0
3 years ago
X = 0
cricket20 [7]

The missing line would be x+= num

This means that every time a number is selected from the range it is added to the value of x.

3 0
3 years ago
Discuss any five barries of integrating ict tools in education​
yawa3891 [41]

Answer:

lack of computer, lack of quality software, lack of time, lack of technical programs and lack of teachers

3 0
3 years ago
Other questions:
  • Suppose that TCP's current estimated values for the round trip time (estimatedRTT) and deviation in the RTT (DevRTT) are 400 mse
    9·1 answer
  • Please I need this answer now.<br>this is the fill in the blanks​
    14·1 answer
  • Which options can you choose to determine the width and height of data or cells in a spreadsheet? You can choose the or rulers t
    10·1 answer
  • What is one purpose of an essay’s conclusion paragraph?
    13·1 answer
  • 8. Cloud Storage is
    5·2 answers
  • Recall the binary search algorithm.1. Using the algorithm/algorithmic environment, give pseudocode using a for loop.AnswerMy alg
    5·1 answer
  • ​what is the difference between a normal mouse and trackball? What do you think. ​​​​
    7·1 answer
  • What command issued from the command prompt will show the route that a packet travels from the issuing computer to another compu
    12·1 answer
  • These operating systems use a graphical user interface.
    8·1 answer
  • What is your favorite anime ( All movies and episodes related to them count )
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!