Question

In: Computer Science

Given the heights of 7 engineering students, H1, H2, H3, H4, H5, H6, H7. Create a...

Given the heights of 7 engineering students, H1, H2, H3, H4, H5, H6, H7. Create a pseudocode and flowchart to find the mean, median, mode, min, max, variance and standard deviation.

Solutions

Expert Solution

Pseudocode:-

Start Program

Set H1

Set H2

Set H3

Set H4

Set H5

Set H6

Set H7

Mean=Call FindMean(arguments: H1,H2,H3,H4,H5,H6,H7)

Median=H4

Mod=Call FindMod(arguments: H1,H2,H3,H4,H5,H6,H7)

Min=H1

Max=H7

Variance=Call FindVariance(arguments: H1,H2,H3,H4,H5,H6,H7)

Sd=Call FindSd(arguments: H1,H2,H3,H4,H5,H6,H7)

Call Display(arguments:Mean,Median,Mod,Min,Max,Variance,Sd)

End Program

Function FindMean(parameters: H1,H2,H3,H4,H5,H6,H7)

       Set Mean to (H1+H2+H3+H4+H5+H6+H7)/7

       Return(Mean)

End Function

Function FindMod(parameters: H1,H2,H3,H4,H5,H6,H7)

       Set Mod=0

       IF H2%H1>Mod

             Mod=H2%H1

      End IF

      IF H3%H1>Mod

             Mod=H3%H1

      End IF

       IF H4%H1>Mod

             Mod=H4%H1

      End IF

       IF H5%H1>Mod

             Mod=H5%H1

      End IF

       IF H6%H1>Mod

             Mod=H6%H1

      End IF

       IF H7%H1>Mod

             Mod=H7%H1

      End IF

       Return(Mod)

End Function

Function FindVariance(parameters: H1,H2,H3,H4,H5,H6,H7)

       Mean=Call FindMean(arguments: H1,H2,H3,H4,H5,H6,H7)

       Variance=((H1-Mean)^2+(H2-Mean)^2+(H3-Mean)^2+(H4-Mean)^2+(H5-Mean)^2+(H6-Mean)^2+(H7-Mean)^2)/7

     Return(Variance)

End Function

Function FindSd(parameters: H1,H2,H3,H4,H5,H6,H7)

       Sd=Call FindVariance(parameters:H1,H2,H3,H4,H5,H6,H7)

       Return(sqrt(Sd))

End Function

Function Display(parameters:Mean,Median,Mod,Min,Max,Variance,Sd)

    Print Mean

    Print Median

    Print Mod

    Print Min

   Print Max

   Print Variance

   Print Sd

End Function

-------------------------------------------------------------

Flowchart


Related Solutions

∆H1,  ∆H2, and ∆H3 are the enthalpy of the following reactions: NaOH(s) àNa+(aq) + OH-(aq)            ∆H1...
∆H1,  ∆H2, and ∆H3 are the enthalpy of the following reactions: NaOH(s) àNa+(aq) + OH-(aq)            ∆H1 NaOH(s) + H+(aq) + Cl-(aq)àH2O(l) + Na+(aq) + Cl-(aq)    ∆H2 Na+(aq) + OH-(aq) + H+(aq) + Cl-(aq)à H2O(l) + Na+(aq) + Cl-(aq)           ∆H3 Please write an equation that will demonstrate the relationship among ∆H1,  ∆H2, and ∆H3 based on Hess's Law.
The posterior probabilities of four hypothesis h1,h2,h3,h4 are (0.2, 0.5,0.2, 0.1) respectively. A new training sample...
The posterior probabilities of four hypothesis h1,h2,h3,h4 are (0.2, 0.5,0.2, 0.1) respectively. A new training sample is classified +ve by h2 and h3, while h1 and h4 classify the same data instance as -ve. Find the classification with Bayes Optimal Classifier and Brute Force Classification?
Please answer as soon as possible (Chemical Engineering) Given The reactions C3H8 → C3H6 + H2...
Please answer as soon as possible (Chemical Engineering) Given The reactions C3H8 → C3H6 + H2 C3H8 + 2H2 → 3CH4 The feed contains 90.0 mole% propane(C3H8) and the balance inert. The fractional conversion of propane is 0.603 and the fractional yield of propylene is 0.541. Calculate the molar composition of the product gases and selectivity of ethylene to methane production.
1. Assume that female students’ heights are normally distributed with a mean given by µ =...
1. Assume that female students’ heights are normally distributed with a mean given by µ = 64.2 in. and a standard deviation given by σ =2.6 in. a) If one female student is randomly selected, find the probability that her height is between 64.2 in. and 66.2 in. b) If 25 female students are randomly selected, find the probability that they have a mean height between 64.2 in. and 66.2 in.
Assume that female students’ heights are normally distributed with a mean given by µ = 64.2...
Assume that female students’ heights are normally distributed with a mean given by µ = 64.2 in. and a standard deviation given by σ =2.6 in. a) If one female student is randomly selected, find the probability that her height is between 64.2 inches and 66.2 inches b) If 25 female students are randomly selected, find the probability that they have a mean height between 64.2 inches and 66.2 inches
The female students in an undergraduate engineering core counse at ASU self-reported their heights to the nearest inch. The data (sample) follow.
The female students in an undergraduate engineering core counse at ASU self-reported their heights to the nearest inch. The data (sample) follow.                        (a) Find the mean, mode, median, variance, standard deviation, Q1, and Q3 of the data.(b) Construct a frequency table with 6 classes.(c) Using the grouped data formula, find the mean, mode, median, variance, standard deviation, Q1, and Q3 for the table in part (b).(d) Find a 95% confidence interval for the population mean μ.(e) Find a 95% confidence...
Taylor series f(xi+1)=f(xi)+f'(xi)h+(f''(xi)/2!)h2+(f'''(xi)/3!)h3+..... given f''(xi)=(-f(xi+3)+4f(xi+2)-5f(xi+1​)+2f(xi))/h2 what is the order of error o(h2)
Taylor series f(xi+1)=f(xi)+f'(xi)h+(f''(xi)/2!)h2+(f'''(xi)/3!)h3+..... given f''(xi)=(-f(xi+3)+4f(xi+2)-5f(xi+1​)+2f(xi))/h2 what is the order of error o(h2)
Given an array of Student type and size 10, create a linked list of students by...
Given an array of Student type and size 10, create a linked list of students by linking students with an odd index first and then linking students with an even index. Write a loop to print out the students in the linked list #include<iostream> #include<string> #include<fstream> using namespace std; const int NUM = 10; struct Student{ string fName; string lName; Student * next; }; int main() {        Student stuArr[NUM];        ifstream myfile;        myfile.open("Test.txt");        for(int i = 0;...
Given an array of Student type and size 10, create a linked list of students by...
Given an array of Student type and size 10, create a linked list of students by linking students with an odd index first and then linking students with an even index. Write a loop to print out the students in the linked list. #include #include #include using namespace std; const int NUM = 10; struct Student{ string fName; string lName; Student * next; }; int main() { Student stuArr[NUM]; ifstream myfile; myfile.open("Test.txt"); for(int i = 0; i < NUM; i++)...
Consider the casual CT systems with transfer functions: H1(s)= (s+1)/(s+2)(s^2+s+16) H2(s)= s/(s+10)(s+1) H3(s)= 1/(s-1)(s+1) H4(s)= s/(s+1)(s^2+s+16)...
Consider the casual CT systems with transfer functions: H1(s)= (s+1)/(s+2)(s^2+s+16) H2(s)= s/(s+10)(s+1) H3(s)= 1/(s-1)(s+1) H4(s)= s/(s+1)(s^2+s+16) 1) Write magnitude and phase expression for their Bode Plots and Sketch their asymptotes. Verify Using Matlab. 2) Compute their steady-state response to cos(5t) u(t) + 3u(t) + cos(10t) e^-t u(t). ***Please show slope computations and conversions for the graphs. This is where I am unable to move forward.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT