For two arrays A and B that are already in ascending order, write a program to mingle them into a new array ordered C evenly, the size of C is varied, depending on the values of A and B: the even-indexed (the index starts from 0) elements come from A while odd-indexed elements are from B. For instance, if A is (1,4, 10,12): B is 12.3,10, 11) then the new array C is (1, 2,4,10,12). If a black-box test approach will be used, how many test cases should you design?

Answers

Answer 1

Answer:

def generate_list(listA, listB):

   listC = []

   for item in listA[0::2]:

       listC.append(item)

   for items in listB[1::2]:

     listC.append(items)

   return sorted(listC)

Explanation:

The python program defines a function called generate_list that accepts two list arguments. The return list is the combined list values of both input lists with the even index value from the first list and the odd index value from the second list.


Related Questions

Write a public member function removeRandom that removes a random element from the ArrayBag. This method should also return a boolean indicating whether an element was actually removed

Answers

Answer:

Explanation:

The following code is written in Java. It is a function that takes in the ArrayList called ArrayBag as a parameter and randomly removes one of the elements in the ArrayList. As long as the ArrayBag has at least 1 element it will return true otherwise it will return false.

public static boolean removeRandom(ArrayList ArrayBag) {

               Random rand = new Random();

               

               if (ArrayBag.size() > 0) {

                       int randomNumber = rand.nextInt(ArrayBag.size());

                       ArrayBag.remove(randomNumber);

                       return true;

               } else {

                       return false;

               }

       }

the processes of only seeing only some records frome data table is called as what​

Answers

Explanation:

For other uses, see Table. An example table rendered in a web browser using HTML. A table is an arrangement of data in rows and columns, or possibly in a more ... The first row is not . is called Html

By dividing the control plane from the data plane, SDN offers the flexibility to view the entire data plane infrastructure as a ________ resource that can be configured and controlled by an upper layer control plane.

Answers

Answer:

Virtual

By dividing the control plane from the data plane, SDN offers the flexibility to view the entire data plane infrastructure as a Virtual resource that can be configured and controlled by an upper layer control plane.

Explanation:

The separating data plane (SDN) is used by users to hide the specifics of a device data layer so that all devices would be treated equally thereby representing the entire data plane as a  virtual abstract layer thus enhancing network efficiency.

The SDN work mainly on the Control and data plane separating both of the planes. Also, the SDN make networks more agile and flexible.

SDN provides the flexibility to view the entire data plane infrastructure as a

virtual resource that can be configured and controlled by an upper layer

control plane.

The type of resource which makes use of SDN to control an upper layer control plane is known as:

Virtual  

Based on the given question, we are asked to state the type of resource which makes use of SDN to control an upper layer control plane and how it is viewed for it it function effectively.

With this in mind, we can see that this can only be effectively done with a virtual resource so that the separating data plane can be effective in hiding the device data layer and test the other variables.

Read more about virtual resource here:

https://brainly.com/question/2680845

Write a C++ function, smallestIndex, that takes as parameters an int array and its size and returns the index of the first occurrence of the smallest element in the array. To test your function, write a main that prompts a user for a list of 15 integers and outputs the index and value of the first occurrence of the smallest value.

Answers

Answer:

Explanation:

The code in C++ is written as:

#include <iostream>

using namespace std;

int smallestIndex(int arr[],int size)

{

int min=arr[0],ind=0;

for(int i=0;i<size;i++)

{

if(min>arr[i])

{

min=arr[i];

ind=i;              NOTE: ind serves as a variable that is holding the smallest

}                                   element index of array

 

}

return ind;

}

int main() {

int arr[15];

cout<<"Enter 15 integers: ";

for(int i=0;i<15;i++)

cin>>arr[i];

for(int i=0;i<15;i++)

cout<<arr[i]<<" "<<endl;

int index=smallestIndex(arr,15);

cout<<"The position of the first occurrence of the smallest element in list is: "<<index<<endl;

cout<<"The smallest element in list is: "<<arr[index];

}

OUTPUT:

Enter 15 integers:

4

5

8

4

6

1

2

1

4

5

7

9

5

7

8

4   5  8  4  6  1  2  1  4  5  7  9  5  7  8  

The position of the first occurrence for the smallest element in the list is 5

The smallest element in the list is: 1

computer hardware without software is useless while computer software without hardware is meaningless. explain what do you understand by this statement ​

Answers

Answer:

That the software is useless

Explanation:

Create a method named replaceCastMember that allows the name of a castMember at an index in the castMembers array to be changed. The method should take in 2 arguments, the int index and the String castMemberName. The method should return a true if the replacement was successful, false otherwise. (Note: Only update the castMember in the array if the index is valid)

Answers

Answer:

Explanation:

The following code is written in Java. It is a method that takes in the two parameters as requested and checks whether or not the index exists in the array. If it does then it replaces the String in that Index with the new castMemberName String parameter that was given. If the replacement is successful then it returns a True boolean, if not then it returns a False boolean. The array being used must be named castNames and have a global scope to be accessible by the method since it is not passed as a parameter.

public static boolean replaceCastMember(int index, String castMemberName) {

               System.out.println(castNames.size());

               if (index <= castNames.size()) {

                       castNames.remove(index);

                       castNames.add(index, castMemberName);

                       return true;

               } else {

                       return false;

               }

       }

What features do web development tools provide?

Web development tools come with several features to ease the process of building websites. Templates allow you to
experiment with a ___
Plug-ins allow you to___

Answers

The correct answer for the first choice is “variety of looks” and the other answer is “add features such as a payment system or spam blocker”
Explanation: platolivesmattertooyk?

What is the default zoom percentage in Word?

50%
100%
150%
200%

Answers

Answer:

The default zoom percentage in Word is 100%.

Answer:

100

Explanation:

A desktop system on your network has been compromised. Despite loading different operating systems using different media on the same desktop, attackers appear to have access to that system every time it is powered up and placed on the network. This could be an example of what type of rootkit

Answers

Answer: Firmware rootkit

Explanation:

From the question, since despite loading different operating systems using different media on the same desktop, and the fact that attackers appear to have access to that system every time it is powered up and placed on the network. This could be an example of firmware rootkit

Firmware rootkits are a threat to ones online safety. In this scenario, the firmware of the computer are targeted by the rootkits and not the operating system and malware are then installed which can destroy the router, or hard drive. This can be used by hackers.

Users report that the network is down. As a help desk technician, you investigate and determine that a specific router is configured so that a routing loop exists. What should you do next

Answers

Answer:

Determine if escalation is needed.

Explanation:

Since in this case, it has been determined that a specific router is configured in a way that a routing loop exists, the technician would further need to determine if the following issues are persistent;

having a switching loop on the networkgeneral router problemsrouting loopif there are broadcast storms.

The logical way tables are linked is known as the database…

A. Schema
B. Primary Key

Answers

Answer:

B Primary Key

Explanation:

I think it is Primary Key but you can just make sure

Create a SELECT statement that returns the count, average, max and min of the invoices submitted by each vendor, who has submitted more than one invoice. Order by the number of invoices in descending order. Should return 12 rows.

Answers

Answer:

SELECT Count(order_invoice) as number_of_invoices, Max(order_invoice) as maximum_invoice, Min(order_invoice) as minimum_invoice, Avg(order_invoice) as average_invoice

FROM vendor JOIN invoice ON invoice.id = vendor.id

WHERE order_invoice > 1

ORDER BY number_of_invoices DESC

Explanation:

The select statement of the SQL or structured query language returns twelve rows of four columns from the inner join of the vendor and invoice table in a database where the order_invoice column in the invoice table is greater than one. The result of the query is ordered by the alias column "number_of_invoices" in descending order.

Write a program that declares an array named myArray with 8 components of the type int. Initialize the array to 8 values that the user inputs (remember to prompt the user). Finally, pass the array as a parameter to a new function called filterEvens. This new function will display all of the even numbers in the array.

Answers

Answer:

#include <iostream>

using namespace std;

void filterEvens(int myArray[]) {

   for (int i = 0; i < 8; ++i) {

     if(myArray[i]%2==0){

         cout<<myArray[i]<<" ";

     }

  }

}

int main(){

   int myArray[8];

   for(int i =0;i<8;i++){

       cin>>myArray[i];

   }

   filterEvens(myArray);

   return 0;

}

Explanation:

The solution is provided in C++

#include <iostream>

using namespace std;

The function filerEvens is defined here

void filterEvens(int myArray[]) {

This iterates through the elements of the array

   for (int i = 0; i < 8; ++i) {

This checks if current element is an even number

     if(myArray[i]%2==0){

If yes, this prints the array element

         cout<<myArray[i]<<" ";

     }

  }

}

The main begins here

int main(){

This declares an integer array of 8 elements

   int myArray[8];

The following iteration allows input into the array

   for(int i =0;i<8;i++){

       cin>>myArray[i];

   }

This calls the defined function filter Evens

   filterEvens(myArray);

   return 0;

}

apply the fade transition with smoothly effect to all slides in the presentation​

Answers

Answer:

12

Explanation:

its very long answer so that it is that

You are a network administrator for your company. A frantic user calls you one morning exclaiming that nothing is working. What should you do next in your troubleshooting strategy

Answers

Answer:

Explanation:

With these types of problems, you need to first try and Isolate the specific problem so that you can then come up with and apply a solution. Therefore, your next step should be to ask the client to explain what he is trying to do. Then ask him what he is doing and what is the first problem that he is running into. This will allow you to get a sense of what the client is trying to accomplish as well as his/her knowledge base on what they are doing in order to adapt your strategy accordingly.

Please NEED HELP ASAP WILL MARK BRAINLIEST ONLY #8

Answers

Answer:

I think its A

Explanation:


4. In a relational database, entities are defined by
O A. values.
O B. columns.
O C. attributes.
O D. rows.

Answers

Answer:

C. attributes

Explanation:

A relational database is a database system that stores information within its servers. It has rows and columns that contain the data stored in them and which can be accessed at any time with the right administrative privileges.

In a relational database, entities are defined by their attributes. This is because an entity is the data that needs to be stored so, the attribute specifies that information and gives its value.

which part of the federal reserve system is made up of seven federal reserve board members and five bank representatives

A) federal open market committee
B) federal reserve banks
C) federal reserve board of governors
D) federal reserve expansionary organization

Answers

Answer:

Explanation:

The answer is Federal Open Market Committee

Please need help ASAP will mark brainliest

Answers

Answer:

x8 negakation with a false

2. Write these functions definitions:
d) Function div2Numbers () that divides 2 integers.
Compile and test your function with the following main function:
int main()
1
char op;
cout<<"Enter + to add 2 integers\n";
cout<<"Enter - to subtract 2 integers\n";
cout<<"Enter x to multiply 2 integers\n";
cout<<"Enter / to divide 2 integers\n";
cout<<"Enter the operator required: ";
cin>>op;
switch (op)
{
case '+': add2 Numbers (); break;
case '-': sub2 Numbers (); break;
case 'x' : mul2 Numbers (); break;
case '/': div2 Numbers (); break;
default: cout<<"Invalid operator entered\n";
break;
}
a) Function add2 Numbers () that adds 2 integers.
b) Function sub2 Numbers () that subtracts 2 integers.
c) Function mul2Numbers () that multiplies 2 integers.​

Answers

Answer:

Complete the code with the following code segment:

void add2Numbers(){

   int num1, num2;

   cout<<"Enter any two numbers: ";

   cin>>num1>>num2;

   cout<<num1+num2;

}

void sub2Numbers(){

   int num1, num2;

   cout<<"Enter any two numbers: ";

   cin>>num1>>num2;

   cout<<num1-num2;

}

void mul2Numbers(){

   int num1, num2;

   cout<<"Enter any two numbers: ";

   cin>>num1>>num2;

   cout<<num1*num2;

}

void div2Numbers(){

   int num1, num2;

   cout<<"Enter any two numbers: ";

   cin>>num1>>num2;

if(num2==0){

cout<<"Division by 0 is invalid";

}else{

   cout<<(float)num1/num2;}

}

Explanation:

The function added to this solution are:

add2Numberssub2Numbersmul2Numbersdiv2Numbers

Each of the functions

declares two integers num1 and num2prompt user for inputsgets user inputs from the user

For add2Numbers() function:

This line adds the two integer numbers and prints the result

   cout<<num1+num2;

For sub2Numbers() function:

This line subtracts the two integer numbers and prints the result

   cout<<num1-num2;

For mul2Numbers() function:

This line multiplies the two integer numbers and prints the result

   cout<<num1*num2;

For div2Numbers() function:

This if condtion checks if the denominator is 0

if(num2==0){

If yes, the following is printed

cout<<"Division by 0 is invalid";

If otherwise, the division is calculated and the result is printed

   cout<<(float)num1/num2;

See attachment for complete program

Common uses of webinars include _____. Select all that apply.

A. corporate training

B. business meetings

C. distance learning

D. product demonstrations

Answers

Answer: distance learning

Explanation:

webinars are considered to be the best way that is currently used on a large scale to conduct online classes. it is referred to as the workshop, lecture, etc that conduct through the internet.  

it is defined as an interactive session that main aims to give, receive information in real-time. it consists of audio and video session between the listeners and speaker.

The common uses of the webinars incudes distance learning, corporate meetings, and product demonstration. Thus options B, C, and D are correct.

What is a webinar?

A webinar is an online event that is hosted by the organizations and companies and is broadcasted to the selected group of people by making the use of a computer and the internet.

These webinars can help in the launch of a product, can be useful for the distance learning purpose, and also help in business meetings.

Find out more information about the webinars.

brainly.com/question/20047596

____ Is an Internet service that allows users to send and receive short text messages In real time.

Answers

Answer:

SMS is the answer to this problem

Implement a program called genes.py that does the following: a. Reads a DNA sequence t as command-line argument b. Reads strings (one by one) representing genes from standard input until EOF (use the functions stdio.isEmpty() and stdio.readString()), and for each string s i. Constructs a Gene object g from s ii. Writes g iii. Writes whether g contains the DNA sequence t or not c. Writes the percentage of genes that contain t, up to two decimal places

Answers

Answer:

Following are the code to this question:

import sys#import package sys

class Gene:#defining a class Gene

   gString = ""#defining a string variable

   def __init__(self, gString):#defining a constructor

       self.gString = gString#defining object to hold string value

gCount = 0#defining integer variable

mCount = 0#defining integer variable

t = input();#input value from user end

for s in sys.stdin:#defining for loop to check input value

   g = Gene(s)#defining g variable to pass value in class parameter

   gCount +=1#incrementing the value of gCount variable

   if(t in s):#defining if block to check input

       mCount +=1#incrementing the matchCount value

       print( g.gString,"True")#print value True

   else:#else block

       print( g.gString,"False")#print value False

   print("{:.2f}".format(mCount*100/gCount))#print percentage value

Output:

Please find attachment file.

Explanation:

In the code, a class Gene is declared, that defines a string variable geneString, and creates its constructor, and store the string variable value.

In the next step, a three-variable gCount, mCount, and t defined, in which variable "t" is used for an input value, and inside the for loop, it uses the conditional statement, that checks its value and increments the integer value, and print true or false as a message.

Finish the sentence. If the IP address and MAC address are parameters of layer 3 and layer 2, respectively, a port number is a parameter of ______?

Answers

Answer:

Layer 4

Explanation:

MAC address works at the data link layer (layer 2) of the OSI model. Mac address allows computers to uniquely identify themselves in the network

IP Address is a logical address that works at the network layer of OSI model (layer 3) (actually the IP layer of TCP/IP model).

The port number works at the transport layer of the OSI model (layer 4).The port number uses sequence number to send segments to the correct application thereby ensuring they arrive in the correct order.

Anyone know how to do this?

Answers

Answer:

bro it is simple click on text and click between the lines and u can write easily.

hope u mark me brainliest thank u ♡♡♡

yea you basically fill it in with the information that will be provided on another page

hope this helps : )

brainliest plz

how does a modem work​

Answers

Answer:

modem is a contraction of the words modulator-demodulator. A modem is typically used to send digital data over a phone line. The sending modem modulates the data into a signal that is compatible with the phone line, and the receiving modem demodulates the signal back into digital data.

Explanation:

Darcy was working on a presentation on playing chess. Because she chose the Checkerboard animation for her slide title, she had to use the same animation for her bullet points.

True
False

Answers

The answer is true
Helene
the answers is true of this question

what is a computer ?​

Answers

Answer:

A computer is a machine that can be instructed to carry out sequences of arithmetic or logical operations automatically via computer programming. Modern computers have the ability to follow generalized sets of operations, called programs. These programs enable computers to perform an extremely wide range of tasks.

Explanation:


Well.......

A computer is a machine that can be instructed to carry out sequences of arithmetic or logical operations automatically via computer programming. Modern computers have the ability to follow generalized sets of operations, called programs. These programs enable computers to perform an extraordinary wide range of tasks.










According to Wikipedia ;))

What is solar system​

Answers

Answer:

The sun together with the group of celestial bodies that are held by its attraction and revolve around it is called solar system.

Hope it helps :)

What is your favorite game that you like to play ? ? ?

Answers

Answer:

Elder Scrolls online on xbox

Explanation:

Answer:

minecraft

Explanation:

Other Questions
Write the following ratio using two other notations. 6:7 Use only the numbers above (not any others). Notation one: Notation two: . Xwhat is the answer? Let bring up a topic and discuss on the topic someone should bring one Air masses always move in which direction? Is 413.25 a whole number In CDE, m C = ( x 4 ) mC=(x4) , m D = ( 11 x 11 ) mD=(11x11) , and m E = ( x + 13 ) mE=(x+13) . Find m C . mC. Which two statements are examples of themes?self-identityconflicting situationsThe storys characters struggle against the power of nature.Kindness can bring great rewards.Giving in does not mean giving up. A ball bearing has a diameter of 10 millimeters. what is the volume of the ball bearing rounded to the nearest tenth of a cubic meter.Use 3.14 as an approximation for You bike 11.2 miles in 1.4 hours at a steady rate what equation represents to proportional relationship between the X ours your bike in the distance y in miles that you travel 5.Find the slope.7x- y=-4a) -1/7b) 1/7c) -7I d) 7 A minor league baseball team has a members club. It costs $30 to join and $3 per ticket. Non-members pay $6 per ticket. How many tickets will it take for the cost to be the same? What is the distance between point A and point B? How did the fighting in Iwo Jima and Okinawa affect the Alies' Pacific strategy?OA.OB.OC.OD.by causing the Soviet Union to send troops to the Pacificby causing U.S. admirals to abandon the island-hopping strategy for air assaultsby influencing President Truman's decision to drop the atomic bomb on Japanby encouraging the Allies and Japan to agree to a stalemate in the Pacific Hi!!! People have been giving out points all day and i thought i would have a turn!! (30 points) Ill give the crown to whoever is nicest in their answer!!! Happy holidays :) calculate the packing efficiency of simple cubic unit cell. the chemical reaction in which glucose is converted to ATP in the mitochondria Find the equation of the tangent line to the function f(x) = 3x3 - x + 2 at a =0 Which of these situations might lead to a lawsuit for negligence? Question 1 options: A worker is killed after his employer fails to repair a piece of equipment A professional football player quits the team a year before his contract expires Divorcing parents argue over custody of their children. Neighbors disagree over the boundary between their land _____ is a literary device authors use to portray something opposite of its literal meaning I think of a number. I take away 14. The result is 13. What number am I thinking of? A company's January 1, 2019 balance sheet reported total assets of $153,000 and total liabilities of $61,500. During January 2019, the company completed the following transactions:______. (A) paid a note payable using $11,500 cash (no interest was paid); (B) collected a $10,500 accounts receivable; (C) paid a $5,300 accounts payable; and (D) purchased a truck for $5,300 cash and by signing a $21,500 note payable from a bank. The company's January 31, 2019 balance sheet would report which of the following?Assets Liabilities Stockholders's Equity$163,000 $77,700 $85,300Assets Liabilities Stockholders's Equity$153,000 $61,500 $91,500Assets Liabilities Stockholders's Equity$174,500 $105,100 $69,400Assets Liabilities Stockholders's Equity$157,700 $66,200 $91,500