Q1: Which of the following is an input peripheral device?

• Speakers
• Printer
• Mouse
• Display monitor

Answers

Answer 1

Answer:

Mouse

Explanation:

Input devices allow users to input something in the computer. For example keyboard allows users to type on the computer, or mouse allows users to click.

On the other hand output devices allow computers to output data. For example speakers allow us to hear the outputs of a computer.


Related Questions

Which of the following are valid data definition statements that create an array of unsigned bytes containing decimal 10, 20, and 30, named myArray.

a. myArray BYTE 10, 20, 30

b. BYTE myArray 10, 20, 30

c. BYTE myArray[3]: 10, 20,30

d. myArray BYTE DUP (3) 10,20,30

Answers

Answer:

The answer is "Option a".

Explanation:

In the question it is defined, that an array "myArray" is defined, which contain the decimal 10, 20 and 30 unsigned bytes, and to assign these value first name of array is used, then the bytes keyword is used after then values, and other options were wrong that can be described as follows:

In option b and option c, The byte keyword firstly used, which is illegal, that's why it is wrong.In option d, In this code, DUP is used, which is not defined in question, that's why it is wrong.

An application server is used to communicate between a Web server and an organization's back-end systems.
True/False

Answers

Yes but i dont think theres a representative behind the same question ur on

Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements using rand() to print two random integers between 0 and 9. End with a newline. Ex:
5
7
Note: For this activity, using one statement may yield different output (due to the compiler calling rand() in a different order). Use two statements for this activ

Answers

Answer:

The C++ code is given below with appropriate comments

Explanation:

//Use stdafx.h for visual studio.

#include "stdafx.h"

#include <iostream>

//Enable use of rand()

#include <cstdlib>

//Enable use of time()

#include <ctime>

using namespace std;

int main()

{

    //Note that same variable cannot be defined to two

    //different type in c++

    //Thus, use either one of the two statement

    //int seedVal=0;time_t seedVal;

    //int seedVal=0;

    time_t seedVal;

    seedVal = time(0);

    srand(seedVal);

    //Use rand to generate two number by setting range

    // between 0 and 9. Use endl for newline.

    cout << (0 + rand() % ((10 - 0) + 0)) << endl;

    cout << (0 + rand() % ((10 - 0) + 0)) << endl;

    //Use for visual studio.

    system("pause");

    return 0;

}

To seed the random number generator, use srand(seedVal);. To generate and print two random integers between 0 and 9, use two separate calls to rand() % 10 with a newline character at the end of each print statement.

To seed the random number generator using srand(), you would use the variable seedVal as follows:

srand(seedVal);

Then to print two random integers between 0 and 9, you should call rand() twice using separate statements and utilize the modulus operator to ensure the numbers fall within the desired range:

printf("%d\n", rand() % 10);
printf("%d\n", rand() % 10);

Each call to rand() should be followed with a newline character for clear output separation.

g Returns the contents of the list as a new array, with elements in the same order they appear in the list. The length of the array produced must be the same as the size of the list.

Answers

Answer:

Find the attached picture

Explanation:

Attached picture contains the Python function which takes a list as argument and returns a new list with same size and elements in same order.

Write a program called interleave that accepts two ArrayLists of integers list1 and list2 as parameters and inserts the elements of list2 into list1 at alternating indexes. If the lists are of unequal length, the remaining elements of the longer list are left at the end of list1.

Answers

Answer:

Explanation code is given below along with step by step comments!

Explanation:

// first we create a function which accepts two ArrayList of integers named list1 and list2

public static void interleave(ArrayList<Integer> list1, ArrayList<Integer> list2)

{

// we compare the size of list1 and list2 to get the minimum of two and store it in variable n

   int n = Math.min(list1.size(), list2.size());

   int i;

// here we are getting the elements from list2 n times then we add those elements in the list1 alternating (2*i+1)

   for (i = 0; i < n; i++)

     {

       int x = list2.get(i);

       list1.add(2 * i + 1, x);

      }

// if the size of list1 and list2 is same then program stops here else we need to append extra elements at the end of list1

// then we check if the size of list2 is greater than list1 then simply add the remaining elements into list1

   if (i < list2.size())

{

       for (int j = i; j < list2.size(); j++)

           {

                list1.add(list2.get(j));

            }  

     }  

}

Sample Output:

list1=[1, 2, 3]

list2=[5, 6, 7, 8, 9]

list1=[1, 5, 2, 6, 3, 7, 8, 9]

In Oracle, you can use the SQL Plus command show errors to help you diagnose errors found in PL/SQL blocks.a. Trueb. False

Answers

Answer:

The correct answer is letter "A": True.

Explanation:

SQL Plus commands are tools that allow users access to Oracle RDBM. Among its features, it is useful to startup and shutdown an Oracle database, connect to an Oracle database, enter SQL*Plus commands to set up the SQL Plus environment, and enter and execute SQL commands and PL/SQL blocks.

The statement is true. You can use the SQL Plus command 'show errors' in Oracle to diagnose syntax and runtime errors in PL/SQL blocks. Logical errors do not produce error messages and are harder to diagnose.

The statement is true. In Oracle, using the SQL Plus command show errors can help you diagnose errors found in PL/SQL blocks.

When you create or modify a PL/SQL block, it is compiled automatically, and any found compilation errors, be it syntax or runtime errors, can be displayed using the show errors command.

Logical errors, on the other hand, do not produce error messages and are usually more difficult to diagnose and solve because they depend on the correct logic and flow of the program rather than syntax or runtime constraints.

Write an if-else statement for the following:

If userTickets is less than 6, execute awardPoints = 1.
Else, execute awardPoints = userTickets.
Ex: If userTickets is 3, then awardPoints = 1.

Answers

Answer:

if(userTickets< 6)

awardPoints = 1;

else

awardPoints = userTickets;

Explanation:

The above code is in C language, In which the first statement is used to compare the userTickets value by 6 that userTickets value is less than 6 or not.If the user tickets value is less than 6 then the statement of 'if' condition will be executed which assign the 1 value to the awardPoints.If the user tickets value is not less than 6 then the statement of else will be executed which assign userTickets value to the awardPoint

The  if-else statement for the following code is :

x = 6

userTickets = 3

if x < 6:

  awardPoints = 1

  print(awardPoints)

else:

  awardPoints = userTickets

  print(awardPoints)

The code is written in python.

Code explanation:The variable x is initialise to 6The variable userTickets is also initialise to 3.Using the if statement, we check if x is less than 6.If it is less than 6, awardPoints is equals to 1 and it is printed out.Else awardPoints is equals to the userTickets and then it is outputted using the print statement.  

learn more on if-else statement here: https://brainly.com/question/25302477?referrer=searchResults

Write a function that computes the average and standard deviation of four scores. The standard deviation is defined to be the square root of the average of the four values: (si − a )2, where a is the average of the four scores s1, s2, s3, and s4. The function will have six parameters and will call two other functions. Embed the function in a program that allows you to test the function again and again until you tell the program you are finished.

Answers

Answer:

#include<iostream>

#include<cmath>

using namespace std;

double calAvg(double s1, double s2,double s3, double s4);

double calStandardDeviation(double s1, double s2,double s3, double s4,double average,int n);

void main()

{

 double s1,s2,s3,s4;

double avg,StandardDeviation;

char option;

   do

{

 cout<<"Enter s1:";

 cin>>s1;

 cout<<"Enter s2:";

 cin>>s2;

 cout<<"Enter s3:";

 cin>>s3;

        cout<<"Enter s4:";

 cin>>s4;

 avg=calcAvg(s1,s2,s3,s4);

        sdeviation=calcStandardDeviation(s1,s2,s3,s4,avg,4);

 cout<<"Standard deviation:"<<sdeviation<<endl;

 cout<<"Do you want to continue then press y:";

         cin>>option;

}

       while (option='y');

}

double Average(double s1, double s2,double s3, double s4)

{

return (s1+s2+s3+s4)/4;

}

double calcStandardDeviation(double s1, double s2,double s3, double s4, double mean,int n)

{

double sd;

sd=(pow((s1-mean),2)+pow((s2-mean),2)+

                     pow((s3-mean),2)+pow((s4-mean),2))/n;

sd=sqrt(sd);

return sd;

}

In this exercise we have to use the knowledge in computer language to write a code in C, like this:

the code can be found in the attached image

to make it simpler we have that the code will be given by:

#include<iostream>

#include<cmath>

using namespace std;

double calAvg(double s1, double s2,double s3, double s4);

double calStandardDeviation(double s1, double s2,double s3, double s4,double average,int n);

void main()

{

double s1,s2,s3,s4;

double avg,StandardDeviation;

char option;

  do

{

cout<<"Enter s1:";

cin>>s1;

cout<<"Enter s2:";

cin>>s2;

cout<<"Enter s3:";

cin>>s3;

       cout<<"Enter s4:";

cin>>s4;

avg=calcAvg(s1,s2,s3,s4);

       sdeviation=calcStandardDeviation(s1,s2,s3,s4,avg,4);

cout<<"Standard deviation:"<<sdeviation<<endl;

cout<<"Do you want to continue then press y:";

        cin>>option;

}

      while (option='y');

}

double Average(double s1, double s2,double s3, double s4)

{

return (s1+s2+s3+s4)/4;

}

double calcStandardDeviation(double s1, double s2,double s3, double s4, double mean,int n)

{

double sd;

sd=(pow((s1-mean),2)+pow((s2-mean),2)+

                    pow((s3-mean),2)+pow((s4-mean),2))/n;

sd=sqrt(sd);

return sd;

}

See more about C code at brainly.com/question/25870717

1. Write an LMC (Little Man Computer) program to do the following task. if (value == 0) { some_statements; } next_statement;
2. Write an LMC program to add three numbers. The numbers are provided in the in-basket. The sum of the numbers should appear in the out-basket.

Answers

Answer:

The program is given below with appropriate comments for better understanding

Explanation:

1) LMC Program:

LDA A //Load A

SUB B //Subtract from A, B which is 0.

SKZ // skip next statement if A-B == 0 , which is A == 0 as B is zero.

JMP ENDIF // jump to ENDIF point if A not equal to 0, else this step is skipped.

OUT // some statement , not called if A != 0.

ENDIF LDA A // jump statement arrives here if A != 0.

HLT //HALT

2) LMC Program:

//input first number  

INP

//store it at address 99

STA 99

//input second number

INP

//add it to value at 99

ADD 99

//store the resulting sum to 99

STA 99

//input third number

INP

//add the number to value at 99 address(which is the sum of first and second number)

ADD 99

//output sum

OUT

//halt

HLT

In the following code, what is the first line that introduces a memory leak into the program?

(Type the line number into the box below)

1: #include
2: #include
3: #include
4: int main() {
5:char *word1 = NULL;
6: word1 = malloc(sizeof(char) * 11);
7: word1 = "bramble";
8: char *word2 = NULL:
9: word2 = malloc(sizeof(char) * 11);
10: word2 = word1;
11: return 0;
12: }

Answers

Answer:

The description of the given code is given below:

Explanation:

Memory leak:

In a program, if memory is assigned to the pointer variables but that memory is already released previously then the condition of occurring the memory leakage.

Now the program :

#include <stdio.h>  //header file

#include <stdlib.h>  //header file

#include <string.h> //header file

int main()   //main function

{

char *word1 = NULL;   //line 1 (as given in the question)

word1 = malloc(sizeof(char) * 11);  //line 2

free(word1);  //free the memory of pointer word1  line 3

word1 = "bramble";   //line 4

char *word2 = NULL;   //line 5

word2 = malloc(sizeof(char) * 11);   //line 6

free(word2);  //free the memory of pointer word2  line 7

word2 = word1;   //line 8

return 0;   //line 9

}

Therefore, line 3 is the first line that introduce a memory leak anf after that line 7 introduce it in a program.

Zipoids is a level of currency used by obscure gamers. These gamers must pay tax in the following manner 0 - 5,000 zipoids – 0% tax 5001 - 10,000 zipoids – 10% tax 10,001 – 20,000 zipoid – 15% tax Above 20,000 zipoids 20% tax Write a program that will get the amount of Zipoids earned and will compute the tax. Your program should output the tax and the adjusted pay after the tax. You should use a ladder style if /else to compute this. Do not put cin or cout inside the if logic. Only compute the tax.

Answers

Answer:

C++

Explanation:

#include <iostream>

int main() {

   int zipoids, tax = 0;

   cout<<"Enter Zipoids earned: ";

   cin>>zipoids;

   // Compute tax

   if ((zipoids > 5000) && (zipoids <= 10000))

       tax = 10;

   else if ((zipoids > 10000) && (zipoids <= 20000))

       tax = 15;

   else

       tax = 20;

   // Output tax

   cout<<endl;

   cout<<"Tax: "<<tax<<"%";

   return 0;

}

To compute the adjusted pay, you need to have the original pay.

Hope this helps.

Assume that you have been hired by a small veterinary practice to help them prepare a contingency planning document. The practice has a small LAN with four computers and Internet access.
1. Prepare a list of threat categories and the associated business impact for each.
2. Identify preventive measures for each type of threat category.
3. Include at least one major disaster in the plan.

Answers

Answer:

Answer explained below

Explanation:

Given: The information provided is given as follows:

There is a small veterinary practice which includes the services like office visits, surgery, hospitalization and boarding. The clinic only has a small LAN, four computers and internet access. The clinic only accepts cats and dogs. Hurricanes are the major threatening factor in the geographical region where the clinic is located. The clinic is established in a one-story building with no windows and meet all the codes related to hurricanes. As public shelters do not allow animals to stay when there is a possibility of hurricanes, therefore the clinic does not accept animals for boarding during that time

Contingency planning documents for the tasks given is as follows:

Threat category along with their business impact: Hurricane: It is given that the region where the clinic is located is highly threatened by hurricanes. This type of disaster can affect the life of the employees as well as patients present in the building. Also, in case of a strong hurricane, the building can also be damaged. Preventive measures: Separate shelters can be installed for animals in case of emergency.

Fire: In case of fire due to malfunctioning of any electrical equipment or any other reason, there is no window or emergency exit available. It can damage the building and the life of the employees and animals will be in danger. Preventive measures: Services should be provided to all the electrical equipment’s from time to time and emergency exits should be constructed so that there is a way to get out of the building in case the main entrance is blocked due to any reason in the time of emergency.

Viral Influenza: If an employee or animal is suffering from any serious viral disease. That viral infection can easily spread to others and make other animals as well as employees sick. If the employees working in the clinic are sick. This will highly affect the efficiency of them which will then affect the business. Preventive measures: This can be avoided by giving necessary vaccines to the employees from time to time and taking care of the hygiene of the patient as well as the clinic which will make the chance of infection to spread low.

Flood: In case of a flood like situation, as given the building has only one story and there is no emergency exit for employees and animals to escape. This can put the life of the employees and animals in danger and can affect the working of the clinic as well. Preventive measures: This can be prevented by collecting funds and increasing the story’s in the building or constructing alternate site location so that in case of emergency, the animals or employees can be shifted to other locations.

Final answer:

To prepare a contingency planning document for a veterinary practice, you should identify threat categories such as user actions, natural disasters, equipment failure, and major disasters. For each threat, assess business impacts and identify preventive measures like user access control, data backups, and emergency action plans.

Explanation:

Contingency Planning for Veterinary Practice

To assist a small veterinary practice with contingency planning, identifying potential threats and their impact on the business is essential. Here is a summarized approach to address the practice’s needs:

1. Threat Categories and Business Impact

User Actions (malicious/accidental) - These can result in data breaches or data loss, impacting client confidentiality and business operations.

Natural or Man-Made Disasters - Examples include floods or fires which can destroy equipment and data, leading to significant downtime and financial loss.

Equipment Failure - This could be due to power surges or general malfunctions, causing disruption of services and loss of productivity.

Major Disaster (such as chemical release) - Requires an immediate evacuation and can result in extended closure, affecting both client service and revenue.

2. Preventive Measures

Establish strict user access controls and train employees on data security to prevent unauthorized access or misuse.

Implement regular backups and store them offsite to mitigate data loss from equipment failure and disasters.

Install surge protectors and maintain equipment to prevent failures from power issues.

Develop an emergency action plan, including evacuation procedures, to ensure safety and quick resumption of operations in case of a major disaster.

3. Major Disaster Planning

A major disaster such as a flood or chemical spill would need a detailed emergency action plan, with specific focus on evacuation routes, employee safety protocols, and communication plans to stay in touch with clients and authorities.

By anticipating these scenarios, the veterinary practice can create a robust contingency plan that minimizes the impact of each threat and ensures a timely and effective response.

Write a program that allows the user to enter an integer value n and prints all the positive even integers smaller or equal to n, in decreasing order.

Answers

Answer: Following code is in python

n=int(input("Enter integer "))   //taking n as an input

if n%2==0:   //if divisible  by 2

   for i in range(n,0,-2):   //n will be included

       print(i)

else:

   for i in range(n-1,0,-2):   //else n won't be included

       print(i)

OUTPUT :

Enter integer 26

26

24

22

20

18

16

14

12

10

8

6

4

2

Explanation:

An input is taken and converted to int type as the input is of string type in python. It is checked if a number is divisible by 2 as if it is, then number is included because it is an even number and range() method is used which takes 3 numbers as parameters - start, end and step. If the step is -2 then 2 is subtracted every time from n. n is not included if it is not an even number.

he data warehousing maturity model consists of six stages: prenatal, infant, child, teenager, adult, and sage. True False

Answers

Answer:

The correct answer to the following question will be "True".

Explanation:

The maturity model of data warehousing offers a route map for evaluating the success of an enterprise in building data warehouses to encourage intelligence in business and consists of six stages such as maternal, child, infant, juvenile, sage, and adult.This model gives instructions on moving between various phases that can inhibit efficient data warehouses usage.

Therefore, the given statement is true.

Using the CelsiusToKelvin function as a guide, create a new function, changing the name to KelvinToCelsius, and modifying the function accordingly.

#include

double CelsiusToKelvin(double valueCelsius) {
double valueKelvin = 0.0;

valueKelvin = valueCelsius + 273.15;

return valueKelvin;
}


int main(void) {
double valueC = 0.0;
double valueK = 0.0;

valueC = 10.0;
printf("%lf C is %lf K\n", valueC, CelsiusToKelvin(valueC));

valueK = 283.15;
printf("%lf is %lf C\n", valueK, KelvinToCelsius(valueK));

return 0;
}

Answers

The celsiusToKelvin method as a guide checks the Java code given below.

Now, to create a new method, change the name to kelvinToCelsius, and modify the method accordingly, using the celsiusToKelvin method as a guide check the Java code given below.

Hence, //JAVA CODE//

import java. util.Scanner;

public class TemperatureConversion {

public static double celsiusToKelvin(double valueCelsius) {

double valueKelvin;

valueKelvin = valueCelsius + 273.15;

return valueKelvin;

}

public static double kelvinToCelsius(double valueKelvin) {

double valueCelsius;

valueCelsius = valueKelvin - 273.15;

return valueCelsius;

}

public static void main (String [] args) {

Scanner scnr = new Scanner(System.in);

double valueC;

double valueK;

valueC = 10.0;

System.out.println(valueC + " C is " + celsiusToKelvin(valueC) + " K");

valueK = scnr.nextDouble();

System.out.println(valueK + " is " + kelvinToCelsius(valueK) + " C");

}

}

Output:

10.000000 C is 283.150000 K

283.150000 is 10.000000 C

To learn more about Java visit:

brainly.com/question/26642771

#SPJ3

If you want to write some fancy interface on your computer with expanded communication to the Arduino, what library should you use?

Answers

Answer:

The correct answer is letter "C": Java.

Explanation:

Arduino is a developmental free software and hardware organization that provides an electronic prototyping platform that allows users to create electronic objects. To write interfaces with expanded communication in the software, the java library must be used with that purpose to fasten the interface functions. Many java libraries can be used such as java.io, java.lang, java.awt or java.util.

The following procedure was intended to remove all occurrences of element x from list L. Explain why it doesn't always work and suggest a way to repair the procedure so that it performs its intended task.

procedure delete (x: elementtype; var L: LIST);
var
p: position;
begin
p:= FIRST(L);
while p <> END(L) do begin
if RETRIEVE(p,L) =x then
DELETE(p,L);
p := NEXT(p,L)
end
end; { delete }

Answers

Answer:

The answer is explained below

Explanation:

The procedure in the question doesn't work in all the cases. If there are more than one x elements in the List L consecutively then by applying this procedure all the x terms are not deleted because after deleting element x from the List L at position p, the element(suppose this element is also x) at position p+1 moves to position p. But in the above procedure, after deleting x at position p, p it moved forward and the element x at position p after deletion is not checked.

The procedure to remove all the occurrences of element x from List L is given below.

procedure delete ( x: elementtype; var L: LIST );

var

p: position;

begin

p := FIRST(L);

while p <> END(L) do begin

                     if RETRIEVE(p, L) = x then

                                     DELETE(p, L);

                     else

                                       p := NEXT(p, L)

end

end; { delete }

The variable p should not be moved forward after deleting an element from the position p. So we place that statement under an else condition.

Final answer:

The procedure has a bug due to the invalidation of the position variable when an element is deleted. This can be fixed by storing the next position before deletion and then continuing iteration from the next valid position.

Explanation:

The provided procedure for removing all occurrences of an element x from the list L has a logical error. When DELETE(p,L) is called, the current position p becomes invalid since it has been removed from the list. Thus, calling NEXT(p,L) afterwards leads to undefined behavior since p no longer points to a valid element in the list.

One way to fix this procedure is to adjust the position to the next valid element before deleting the current element. Here's a revised version of the procedure that addresses this issue:

procedure delete (x: elementtype; var L: LIST);
var
 p, nextp: position;
begin
 p:= FIRST(L);
 while p <> END(L) do begin
   if RETRIEVE(p,L) = x then begin
     nextp := NEXT(p,L);
     DELETE(p,L);
     p := nextp;
   end else
     p := NEXT(p,L);
 end
end; { fix of the delete procedure }

By using a temporary variable nextp to hold the next position prior to deletion, the procedure ensures that the following position is always a valid reference.

In the center pane of the __________, the direction of each arrow indicates the direction of the TCP traffic, and the length of the arrow indicates between which two addresses the interaction is taking place.

Answers

Answer:

The answer is "Result of Flow Graph Analysis".

Explanation:

A flow chart is also known as a graphical representation of any task. It a graphing program, which collects data, checks its control flows and provides abstracts from program details.

It produces a decision chart in the paper, which reduces the control flow chart but keeps the program branching structure. It also used to manage to troubleshoot network issues.

Which of the following would not be a probable reason for choosing simulation as a decision-making tool?

Answers

Answer:

The correct answer is letter "B": There is a limited time in which to obtain results .

Explanation:

Decision-making tools allow entrepreneurs to analyze their companies from different angles thanks to the information provided. Market research, decision matrix, cost-benefit analysis, T-Charts, or SWOT (Strengths, Weaknesses, Opportunities, and Threats) Analysis are helpful for that purpose.

If a simulation is needed before going with the analysis itself, the time it could take is not specific. In case the company has a close deadline to decide on a topic, managers should avoid simulations and go ahead with the analysis but a deep evaluation of the results must be carried out to confirm accuracy.

Write a program that takes as input a number of kilometers and prints the corresponding number of nautical miles. Use the following approximations: A kilometer represents 1/10,000 of the distance between the North Pole and the equator. There are 90 degrees, containing 60 minutes of arc each, between the North Pole and the equator. A nautical mile is 1 minute of an arc.

Answers

Final Answer:

```python

def kilometers_to_nautical_miles(kilometers):

   nautical_miles = kilometers * 0.0001 * 90 * 60

   print(f"{kilometers} kilometers is approximately {nautical_miles} nautical miles.")

# Example usage:

kilometers_to_nautical_miles(100)

```

Explanation:

In this program, we use the given approximations to convert kilometers to nautical miles. The first approximation states that a kilometer represents 1/10,000 of the distance between the North Pole and the equator. So, we multiply the input kilometers by 0.0001 to get the fraction of this distance.

Next, we consider that there are 90 degrees between the North Pole and the equator, and each degree contains 60 minutes of arc. Therefore, to convert degrees to minutes of arc, we multiply by 90 * 60. Combining these factors, we arrive at the conversion factor.

The formula used is: [tex]\[ \text{{Nautical Miles}} = \text{{Kilometers}} \times \left( \frac{1}{10,000} \times 90 \times 60 \right) \][/tex]

For example, if the input kilometers are 100, the calculation would be [tex]\(100 \times 0.0001 \times 90 \times 60\)[/tex] resulting in the approximate equivalent in nautical miles. The program then prints the input kilometers and the corresponding calculated nautical miles.

This program provides a straightforward and efficient way to perform the conversion while adhering to the given approximations and using a simple mathematical formula.

consider the following environment with a local dns caching resolver and a set of authoritative dns name servers
• the caching resolver cache is empty,
• TTL values for all records is 1 hour,
• RTT between stub resolvers (hosts A, B, and C) and the caching resolver is 20 ms,
• RTT between the caching resolver and any of the authoritative name servers is 150 ms
• There are no packet losses•All processing delays are 0 ms

Answers

Answer:

Normally in a DNS server, There are no packet losses•All processing delays are 0 ms

Explanation:

If any packet lost in DNS then lost in the connection information will be displayed in prompt. Once the packet is lost then data is lost. So if the packet is lost then data communications are lost or the receiver will receive data packet in a lost manner, it is useless.

To connect in windows normally it will take 90 ms for re-establish connection it normally delays the time in windows. So that end-user he or she for best performance ping the host or gateway in dos mode so that connection or communication will not be lost. If any packet is dropped DNS will get sent the packet from sender to receiver and the ping rate will more in the network traffics.

What steps should be followed to properly evaluate an organization’s future with online sales?

Answers

Answer:

Following step have mentioned to evaluate organization's future.

Explanation:

Evaluate organizational goals. The initial step is to identify the specific purposes for evaluation.

Target the customer profiles. It is essential to finding a series of well-constructed customer profiles. If you have no idea of your target customer, you should not launch your online sale.

Check the money you put into your marketing plan has some profit. Must measure the amount of the campaign.

Reading the primary way to determine the plan is working.

Customer response is essential for marketing reactions. Online surveys and customer feedback are crucial.    

Answer and explanation:

Online-sales dedicated companies have spread in number over the past years thanks to the easiness to access to the internet. For those organizations to keep their business up and running, they should take into consideration what other technologies factors are being developed that could help improve their operations or that could wipe out their businesses. It is also important to study consumers' trends because just like with face-to-face sales, they tend to change.

The returns on assets C and D are strongly correlated with a correlation coefficient of 0.80. The variance of returns on C is 0.0009, and the variance of returns on D is 0.0036. What is the covariance of returns on C and D?A) 0.03020.B) 0.00144.C) 0.40110.D) 1.44024.

Answers

Answer:

Option (B) 0.00144

Explanation:

Data provided in the question:

Correlation coefficient, r = 0.80

Variance of returns on C  = 0.0009

Variance of returns on D, = 0.0036

Now,

r = Cov(C,D) / (σA x σB)

Thus,

covariance of returns on C and D,  Cov(C,D) = r × (σA x σB)

also,

σA = (0.0009) × 0.5 = 0.03             [ Since there are two assets, weight = 0.5 ]

σB = (0.0036) × 0.5 = 0.06

Therefore,

covariance of returns on C and D,  Cov(C,D) = 0.8 × 0.03 × 0.06)

or

covariance of returns on C and D = 0.00144

Hence,

Option (B) 0.00144

5. Write few lines of code that creates two arrays with malloc. Then write a statement that can create a memory leak. Discuss why you think your code has a memory leak by drawing the status of the memory after you use malloc and the line of the code you claim that creates a memory leak.

Answers

Answer:

 // function with memory leak  

void func_to_show_mem_leak()  {  

int *pointer;

pointer = malloc(10 * sizeof(int));

*(pointer+3) = 99;}  

 

// driver code  

int main()  

{  

    // Call the function  

   // to get the memory leak  

   func_to_show_mem_leak();  

     return 0;  }

Explanation:

Memory leakage occurs when programmers allocates memory by using new keyword and forgets to deallocate the memory by using delete() function or delete[] operator. One of the most memory leakage occurs by using wrong delete operator. The delete operator should be used to free a single allocated memory space, whereas the delete [] operator should be used to free an array of data values.

(TCO 1) You want to find the IP address of an interface. How can you quickly do this?

Answers

Answer:

Ping the interface using the cmd or terminal

Explanation:

After you design and write your help-desk procedures to solve problems, what should you do next?

Answers

After you design and write your help-desk procedures to solver the problem, the next step would be, testing and implementation.

Basically, in any problem-solving process, after planning and designing the solutions, the next process that should be implemented next is: testing and implementation. In the testing phase, staff and employees would implement the solution softly, meaning everything is not advertised yet and not formal yet. They would execute the plan and design and would evaluate if it is really effective. A documentation will prepare as the basis of the evaluation. After the testing, the project team would determine if the offered solution is possible or if there are more improvements to make.

What is the value of x after each of the following statements is encountered in a computer program, if x=1 before the statement is reached? Please, justify your answer.
a) if (1+2=3) then x:=x+1
b) if ((1+1=3) OR (2+2=3)) then x:=x+1
c) if ((2+3=5) AND (3+4=7)) then x:=x+1

Answers

Answer:

x=2

x=1

x=2

Explanation:

a)

This if statement if (1+2=3) checks if the addition of two numbers 1 and 2 is true. Here the addition of 1 and 2 is 3 which is true. So the condition becomes true.

Since the condition is true x:=x+1 statement is executed. This statement means that the value of x is incremented by 1.

The value of x was 1 before the if statement is reached. So x:=x+1 statement will add 1 to that value of x.

x:=x+1 means x=x+1 which is x=1+1 So x=2

Hence value of x is 2 (x=2) after the execution of x:=x+1

b)

In statement b the value of x will be 1 because both the mathematical operations in the if statement evaluate to false.

which means in b, x:=x+1 will not be executed and value of x remains unchanged i.e x=1

In (c) the value x will be 2 because the condition in the if statement is true. Both mathematical expressions 2+3=5 and 3+4=7 are true. Therefore x:=x+1 will be executed and value of x will be incremented by 1. Hence x=2

You would like to create a dictionary that maps some 2-dimensional points to their associated names. As a first attempt, you write the following code:

points_to_names = {[0, 0]: "home", [1, 2]: "school", [-1, 1]: "market"}

However, this results in a type error.
Describe what the problem is, and propose a solution.

Answers

Answer:

A dictionary is a "key - value" pair data structure type. The syntax for creating a dictionary requires that the keys come first, before the values.

This problem in the question above is as a result of you interchanging the keys and values. THE KEYS MUST COME FIRST BEFORE THE VALUES

Explanation:

To solve this problem you will need to rearrange the code this way

points_to_names = {"home":[0, 0] , "school":[1, 2], "market":[-1, 1] }

See the attached code output that displays the dictionary's keys and values

Suppose that we perform Bucket Sort on an large array of n integers which are relatively uniformly distributed on a,b. i. After m iterations of bucket sorting, approximately how many elements will be in each bucket? ii. Suppose that after m iterations of bucket sorting on such a uniformly distributed array, we switch to an efficient sorting algorithm (such as MergeSort) to sort each bucket. What is the asymptotic running time of this algorithm, in terms of the array size n, the bucket numberk, and the number of bucketing steps m?

Answers

Answer:

Time complexity

Explanation:

If we assume that insertion in a bucket takes O(1) time then steps 1 and 2 of the above algorithm clearly take O(n) time. The O(1) is easily possible if we use a linked list to represent a bucket (In the following code,if C++ vector is used for simplicity). Step 4 also takes O(n) time as there will be n items in all buckets.

The main step to analyze is step 3. This step also takes O(n) time on average if all numbers are uniformly distributed.

Sorted array is

0.1234 0.3434 0.565 0.656 0.665 0.897

Final answer:

i. After m iterations of bucket sorting, approximately n/m elements will be in each bucket. ii. If we switch to an efficient sorting algorithm like MergeSort to sort each bucket, the asymptotic running time would be O(n*log(n/k)).

Explanation:

i. After m iterations of bucket sorting, approximately n/m elements will be in each bucket. This is because bucket sort evenly distributes the elements into buckets based on their values, and after m iterations, each bucket will contain an equal number of elements.
ii. If we switch to an efficient sorting algorithm like MergeSort to sort each bucket, the asymptotic running time of this algorithm would be O(n*log(n/k)), where n is the array size, k is the number of buckets, and m is the number of bucketing steps. This is because we are using MergeSort on each bucket, which has a time complexity of O(n*log(n)), and there are k buckets to sort.
For example, let's say we have an array of 100 elements, 10 buckets, and perform 2 iterations of bucket sorting. After the iterations, each bucket would contain approximately 100/2 = 50 elements. If we then use MergeSort on each bucket, the total running time would be O(100*log(100/10)) = O(100*log(10)).

Write a function isPrime of type int -> bool that returns true if and only if its integer parameter is a prime number. Your function need not behave well if the parameter is negative.

Answers

Answer:

import math

def isPrime(num):

 

   if num % 2 == 0 and num > 2:

       return False

   for i in range(3, int(math.sqrt(num)) + 1, 2):

       if num % i == 0:

           return False

   return True

Explanation:

The solution is provided in the python programming language, firstly the math class is imported so we can use the square root method. The first if statement checks if the number is even and greater than 2 and returns False since all even numbers except two are not prime numbers.

Then using a for loop on a range (3, int(math.sqrt(num)) + 1, 2), the checks if the number evenly divides through i and returns False otherwise it returns True

see code and output attached

Other Questions
On the scale of the cosmic calendar, in which the history of the universe is compressed to 1 year, how long has human civilization (i.e., since ancient Egypt) existed?A. About half the yearB. About a month about a month about a monthC. A few hoursD. A few secondsE. Less than a millionth of a second Using a force of 28.0 Newton, a student pulls a 70.0 Newton weight along the tabletop for a distance of 15.0 meters in 3.0 seconds. Compute the power developed by the student. A man and woman marry. They have five children, 2 girls and 3 boys. The mother is a carrier ofhemophilia, an X-linked disorder. She passes the gene on to two of the boys who died in childhoodand one of the daughters is also a carrier. Both daughters marry men without hemophilia and have 3children (2 boys and a girl). The carrier daughter has one son with hemophilia. One of the non-carrierdaughters sons marries a woman who is a carrier and they have twin daughters. What is the percentchance that each daughter will also be a carrier? Look at the front page of a newspaper published on May 8, 1915, and answer the question.The sinking of the RMS Lusitania is viewed as one of the factors that turned public sentiment in the United States away from remaining neutral. How could the sinking of a British ship have this effect?Group of answer choicesThe ocean liner was en route from New York City and its sinking by a German submarine caused the deaths of 128 US civilian passengers.The United States and the United Kingdom had a military alliance that required them both to declare war if citizens of either were attacked.The German government had previously followed the practice of issuing warnings when targeting shipping routes but did not do so in this case.The German government unsuccessfully tried to blame the sinking on a US submarine in order to drive a wedge between the Allied Forces. How has communism continued to influence economy in Russia? . Based on inference, what is a likely reason so many passengers perished when the Titanic hit the iceberg? What do you believe could have been done to save more lives? Cite from the text to support your claim. 7. Science is to pseudopsychology asis to Analyzing Hawthorne's complex story "Young Good man Brown," it's reasonable to conclude that Good man Brown's perception or interpretation of events represents a setting at the _______ level a. literal b. super-natural c. psychological d. imaginary -10 + 5b = -35...I want to know the answer to this question pls...or else I will fail the 3rd quarter The graph shows the number of hours per day spent on social media by a group of teenagers and the number of hours per day spent exercising. A line of best fit for the data is shown.A scatterplot is shown in the xy-plane. The horizontal axis is labeled as Social Media Hours Per Day and the vertical axis is labeled as Exercising Hours Per Day. The values on the horizontal axis range from 0 to 1.6 in increments of 0.2 and the values on the y-axis range from 0 to 2 in increments of 0.2. The line of best fit intersects the x-axis at a point just to the left of 1 decimal point 4 and y-axis at a point just below 1.1. Majority of the data points are concentrated between 0.3 and 0.6 on the horizontal axis and 0.6 and 0.9 on the vertical axis and two points are marked on the line.Use the graph to determine how many hours a teenager would spend exercising in one day if they spent 0.25 hours on social media.Use the graph to determine how many hours a teenager would spend exercising in one day if they spent 1.38 hours on social media.Do you think the predictions from part (a) and part (b) are reliable? Explain your reasoning. A 0.5 kg ball is dropped from rest at a point 1.2m above the floor. The ball rebounds straight upward to a height of 0.7m. What are the magnitude and direction of the impulse of the net force applied to the ball during the collision with the floor. A translation is shown on the grid below in which triangle A is the pre-image and triangle B is the image.Which rule describes the x-coordinates in the translation?x+0x+6x-6x+4 Upon returning to the Decapolis region a second time after healing the crazed man who had been cutting himself with rocks, Jesus: Use the table above to determine how long it will take the Spirit Club to wax 60 cars 3. Determine which would have fewer protein and DNA basesequence differences with humans-chimpanzees or cows. Examine this map. Which region was the second to industrialize following thendustrial Revolution? Sociology is defined as the __________ study of human society and social behavior from large scale institutions and mass culture to small groups and individual interactions. Calculate the number of grams of xenon in 4.658 g of the compound xenon tetrafluoride. HELP NOW!!!One day in the fall, Mark raked the leaves on 5 neighbors lawns in 2.5 hr. One day in the summer, he mowed 6 neighbors lawns in 1.2 hr.The daily rate Mark rakes lawns in the fall is what percent of the daily rate he mows lawns in the summer, assuming he works at a constant rate. Fereydoun is conducting a study of the annual incomes of high school teachers in metropolitan areas of fewer than 100,000 population, and in metropolitan areas having greater than 500,000 population. If computed z value is 16.1, can he conclude that the annual incomes of high school teachers in metropolitan areas having greater than 500,000 population are significantly greater than those paid in areas with fewer than 100,000 population, at 0.05 level of significance? Steam Workshop Downloader