Question: 2. Given a file containing test scores, one per line, we want to have a new file that contains the scores in increasing order. To

 2. Given a file containing test scores, one per line, we
want to have a new file that contains the scores in increasing

2. Given a file containing test scores, one per line, we want to have a new file that contains the scores in increasing order. To do this, write a Python program that asks the user for two file name strings, one for the input scores and the second for the output, sorted scores. The program should open the first file (to read), read the scores, sort them, open the second file (to write), and output to this file the scores in increasing order. There should be one score per line, with the index on each line. As an example, suppose the input file is scores.txt and it contains 75 100 21 83 15 then running your program should look like (in Wing IDE): Enter the scores file: scores.txt scores.txt Enter the output file: scorgs sorted.txt scores sorted.txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!