Question
PLEASE TYPE THE SCRIPT AND FUNCTIONS AND FOLLOW THE INSTRUCTIONS ALL THE INFORMATION THAT YOU NEED ARE POSTED Topics: xlsread Q: A university asks you
PLEASE TYPE THE SCRIPT AND FUNCTIONS AND FOLLOW THE INSTRUCTIONS
ALL THE INFORMATION THAT YOU NEED ARE POSTED
Topics: xlsread
Q: A university asks you to write a program for calculating the GPA of some students. They have provided the dataset in an Excel file, data_program7. This Excel file includes two sheets: the first sheet is Credits which includes the number of credits each student took in each course, and the second sheet is Grades that includes the grades for each course for each student. Write a script and prompt the user to enter the name of the Excel file. Use xlsread function to read the data. Calculate the GPA for each student using the approach below: multiply the number of credits for each course by the related grade, add all of the resulted values together, and finally divide the calculated summation value by the total number of the credits. After calculating the GPA for all students, create a report for the user with the sorted GPAs in descending format and the corresponding names in two columns. The sample run has been provided for you on the next page.
Notes:
*Assign the name program7 to your script file.
*The related dataset has been uploaded on D2L with the name data_program7. You have to download it inside your current folder before running your code.
*The output of your program has to be completely similar to the sample provided for you at this file.
*You may need to use some of the below functions in your code:
Input
xlsread
diag
sum
sort
cell2mat
THE DATA :
credit sheet 1 ''data_program7''
Grades sheet 2 ''data_program7'
Sample run: Enter the name of the Excel dataset file: 'data program7.xlsx' **The GPA report is ready **** Names GPA 76.70 72.45 70.17 Benjamin68.89 67.82 67.74 Charlotte 64.65 63.20 57.64 55.22 Alex James William Amelia Emma Sophia Olivia MasonStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started