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
stiv31 [10]
2 years ago
8

Modify the statistics program from this chapter so that client programshave more flexibility in computing the mean and/ or stand

ard deviation.Specifically, redesign the library to have the following functions:mean(nums) Returns the mean of numbers in nums.stdDev(nums) Returns the standard deviation of nums.meanStdDev (nums) Returns both the mean and standard deviation of nums.
Computers and Technology
1 answer:
vampirchik [111]2 years ago
8 0

Answer and Explanation:

Using Javascript:

function mean(nums){

var array_numbers= new array(nums);

var meanofNums= array_numbers.reduce()/array_numbers.length;

Console.log(meanofNums);

}

Function Std(nums){

var OurArray= new Array(nums);

var meanOfnums= mean(nums);

var i;

for(i=0; i<=OurArray.length; i++){

OurArray[i]= OurArray[i]-meanOfnums*OurArray[i]-meanOfnums;

}

var al_stdOfnums= OurArray.reduce()/OurArray.length;

var stdOfnums= Math. sqrt(al_stdOfnums);

Console.log(stdOfnums);

}

function meanStdDev (nums){

mean(nums);

Std(nums);

}

/*From the code above, we have defined functions and used them in the last function definition meanStdDev (nums), making for code reusability. In defining the functions, we have followed the formulas for calculating mean and standard deviations and implemented in that order. Notice how we used a for loop in std(nums) function definition to iterate through the elements of the array nums, squaring each value and reassigning a new value for each element(using index value) in the array. We then added these values in array using reduce method, dividing by array length and square rooting the value using the math object method sqrt().*/

You might be interested in
The ______________________ is the part of the ip address that is the same among computers in a network segment.
kozerog [31]
The answer is 
External IP address.
4 0
3 years ago
An employee’s total weekly pay equals the hourly wage multiplied by the total number of regular hours plus any overtime pay. Ove
Feliz [49]

Answer:

C++ programming language is used to implement this program using Dev C++. You can use any C++ compiler to run this program. The code and its explanation is given below in explanation section.

Explanation:

#include<iostream>

using namespace std;

int main()

{

int totalWeeklyPay;//total weekly pay  

int hourlyWage;// wages per hours

 

int totalRegularHour;// total regular hours worked

int totalOverTimeHour;// total over time hours worked

 

int weeklyTotalRegularPay;

int weeklyTotalOverTimePay;

 

cout<<"Enter Wage per hour: ";

 cin>>hourlyWage;

 if (hourlyWage<0)//if use enter negative value

  {

   cout<<"Please enter positive number number for wage per hour\n";

   cout<<"Enter Wage per hour: ";

     cin>>hourlyWage;

  }

cout<<"Enter total regular hour: ";

cin>>totalRegularHour;

if (totalRegularHour<0)//if user enter negative value

  {

   cout<<"Please enter positive total number of regular hour\n";

  cout<<"Enter total regular hour: ";

     cin>>totalRegularHour;

  }

cout<<"Enter total over time hour: ";

cin>>totalOverTimeHour;

 

 if(totalOverTimeHour<0)//if user enter negative value

   {

    cout<<"Please enter positive total number of over time hour\n";

  cout<<"Enter total over time hour: ";

  cin>>totalOverTimeHour;

     

     

 }

 

weeklyTotalRegularPay =hourlyWage*totalRegularHour;// total weekly regular hour pay

weeklyTotalOverTimePay=totalOverTimeHour*hourlyWage*1.5;// total weekly overtime pay

totalWeeklyPay=weeklyTotalRegularPay + weeklyTotalOverTimePay;//total weekly regular hour pay + // total weekly overtime pay

cout<<"Total Weekly Pay is: "<<totalWeeklyPay<<"$";//output

 

 

return 0;

 

}

3 0
3 years ago
How can an Excel table be added to a Word document? Check all that apply.
densk [106]

Answer:

A and B

Explanation:

3 0
3 years ago
Create a web page for a fictitious company: Widgets Inc. has hired you to make a mock-up for their new website. They are on a bu
lina2011 [118]

Answer:

.20%

Explanation:

4 0
2 years ago
A time management tool in a help desk software package probably has the greatest impact on the productivity of _____.
777dan777 [17]

A time management tool in a help desk software package probably has the greatest impact on the productivity of help desk agent.

<h3>What is  help desk software ?</h3>

IT and customer service teams utilize help desk software to assist staff members and customers. Its primary purposes include assisting service teams in methodically managing support requests, offering alternatives for self-service, monitoring and reporting performance, and ideally doing much more.

The objectives and procedures of a help desk when employed by an IT team are established using industry and governmental best practices, such as ITIL (Information Technology Infrastructure Library). The aim of ITIL while handling problems, according to Mikkel Shane, CEO of Zendesk,  is to "establish regular service operation as rapidly as possible and minimize the adverse effect on business operations.”

Simply put, help desk support software is made to provide you with the means of helping your clients feel heard. Here is a little explanation of how it operates:

To know more about help desk software :

brainly.com/question/24171638

#SPJ4

3 0
1 year ago
Other questions:
  • What formatting option is easiest to read when printed out
    12·1 answer
  • In Microsoft Word you can access the _______ command from the "Mini toolbar
    11·1 answer
  • A stack is initially empty, then the following commands are performed: push 5, push 7, pop, push 10, push 5, pop, which of the f
    8·1 answer
  • Can someone please help me with the three questions please?
    6·1 answer
  • Which of the following can be considered beta testing? A programmer at Linus Systems checks the integration of multiple modules
    14·1 answer
  • hello my friend is doing a give away at 100 followers would you follow him for a chance to win 2000 vbucks his name is ZoVa_Velo
    15·2 answers
  • A _________ is a task at the lowest level of the WBS that represents the level of work that the project manager uses to monitor
    5·1 answer
  • Suppose you are given a text file. Design a Python3 program to encrypt/decrypt that text file as follows:
    14·1 answer
  • Match the elements of a web page with their descriptions.
    12·1 answer
  • What is meant by the term text?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!