Problem #1 At the end of the semester, the instructors for a Statics course comp
ID: 3824136 • Letter: P
Question
Problem #1 At the end of the semester, the instructors for a Statics course compile their final grades into a single spreadsheet to determine the general performance of students for their course. These instructors are responsible for ten sections of the course in total. It is assumed that each section contains 49 students. The attached Excel spreadsheet contains data arranged in 10 columns where each column represents each section. As there are 49 students in each section, each column will also have 49 rows. Each number in each cell represents the final grade that a student has earned for the course. Write a MATLAB script to do the following: • Import the entire Excel spreadsheet data into MATLAB • Compute the average final grade for each section • Compute the standard deviation of the final grade for each section • Compute the global average final grade (that is the average final grade of all 490 students) • Compute the global standard deviation of the final grade Your MATLAB script must also complete the following tasks: • Display the average and standard deviation of the final grades for each section in the form of a table • Display the maximum and minimum final grades for each section on the same table • Plot a histogram of the data using the histogram function on MATLAB
Explanation / Answer
#include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
using namespace std;
int main()
{
string studentname;
int score;
int studentscore;
int totalpoints;
int percentage;
int count;
float finalscore;
count = 1;
while (count <=9)
cout <<"Please enter the student's name"<< endl;
cin >>studentscore;
cout <<"Please enter the student's score"<< endl;
cin >>score;
cout <<"Please enter the total points"<< endl;
cin >> totalpoints;
count = count++
finalscore = score / totalpoints;
percentage = finalscore * 100;
if(percentage >= 90)
cout<< studentname<<percentage<<"%"<<finalscore<< "A"<<endl;
if (percentage >=80&&percentage<90)
cout<<studentname <<percentage<< "%"<<finalscore<<"B"<<endl;
if(percentage >=70&& percentage<80)
cout<<studentname<<percentage<< "%"<<finalscore<"C"<<endl;
if (percentage >= 60 &&percentage<70)
cout<<studentname<<percentage<<"%"<<finalscore<<"D"<<endl;
}
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.