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 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 I 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
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 Solutions >
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 Solutions > 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.
Assessment: 0 of 3 Tests Passed
> Is the table array variable Roster Scores 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.
Test
Check whether variable RosterScores has the correct value.
> 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.
Test Code:
1 %Learner solution will overwrite reference solution, but if the learner solution
2 %did not generate the file, the file generated by the reference solution will still
3 %exist.
4 %
5 %delete file generated by reference solution
6 delete RosterScores Sorted.txt
7 run('solution');
8 %check name and existence of file
9 assert (isequal (exist('RosterScores Sorted.txt', 'file'),2), 'File not created with correct name.')
Is the data in the text file you created correct?
Note the variable fileContents is created by the test when it extracts the data from your file. This data is not exactly correct. Check the column headings. Make
sure you have sorted the data according to the test scores.
Transcribed Image Text:Assessment: 0 of 3 Tests Passed > Is the table array variable Roster Scores 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. Test Check whether variable RosterScores has the correct value. > 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. Test Code: 1 %Learner solution will overwrite reference solution, but if the learner solution 2 %did not generate the file, the file generated by the reference solution will still 3 %exist. 4 % 5 %delete file generated by reference solution 6 delete RosterScores Sorted.txt 7 run('solution'); 8 %check name and existence of file 9 assert (isequal (exist('RosterScores Sorted.txt', 'file'),2), 'File not created with correct name.') Is the data in the text file you created correct? Note the variable fileContents is created by the test when it extracts the data from your file. This data is not exactly correct. Check the column headings. Make sure you have sorted the data according to the test scores.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
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