Grade Roster Sort (file I/O) The file RosterScores.txt contains student test scores with comma-delimited data similar to what is shown in the screen snip below. Names, Scores Marie Curie, 89 Caroline Herschel, 70 Mary Anning, 93 Barbara McClintock, 99 Dorothy Hodkin, 85 My Solutio Write a script that loads the data from this file into a table array variable named RosterScores and sorts the rows in order of the test scores running highest to lowest. Save the result in a new text file named RosterScores Sorted.txt.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
RosterGrades=readtable('RosterScores.txt');
RosterGrades.Grades=cell([size(RosterGrades,1),1]);
for i=1:size(RosterGrades,1)
if RosterGrades.Scores(i)>=90
RosterGrades.Grades{i}='A';
elseif RosterGrades.Scores(i)>=80
RosterGrades.Grades{i}='B';
elseif RosterGrades.Scores(i)>=70
RosterGrades.Grades{i}='C';
elseif RosterGrades.Scores(i)>=60
RosterGrades.Grades{i}='D';
else
RosterGrades.Grades{i}='F';
end
end
RosterGrades
writetable(RosterGrades,'RosterScores.txt')
Is the table array variable RosterScores created with the correct data? (Pretest)
The submission must contain a variable named RosterScores.
Review this documentation page (Create table from file) for information on how to create a table array from column oriented data in a text file.
> Does output file exist with the correct name? (Pretest)
File not created with correct name.
Review this documentation page (Write table to file) for information on how to write a table array to a text file.
Is the data in the text file you created correct?
Transcribed Image Text:Is the table array variable RosterScores created with the correct data? (Pretest) The submission must contain a variable named RosterScores. Review this documentation page (Create table from file) for information on how to create a table array from column oriented data in a text file. > Does output file exist with the correct name? (Pretest) File not created with correct name. Review this documentation page (Write table to file) for information on how to write a table array to a text file. Is the data in the text file you created correct?
Grade Roster Sort (file I/O)
The file RosterScores.txt contains student test scores with comma-delimited data similar to what is shown in the screen snip below.
Names, Scores
Marie Curie, 89
Caroline Herschel, 70
Mary Anning, 93
Barbara McClintock, 99
Dorothy Hodkin, 85
My Solution
Write a script that loads the data from this file into a table array variable named RosterScores and sorts the rows in order of the test scores running highest to lowest. Save the
result in a new text file named RosterScores Sorted.txt.
Transcribed Image Text:Grade Roster Sort (file I/O) The file RosterScores.txt contains student test scores with comma-delimited data similar to what is shown in the screen snip below. Names, Scores Marie Curie, 89 Caroline Herschel, 70 Mary Anning, 93 Barbara McClintock, 99 Dorothy Hodkin, 85 My Solution Write a script that loads the data from this file into a table array variable named RosterScores and sorts the rows in order of the test scores running highest to lowest. Save the result in a new text file named RosterScores Sorted.txt.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY