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…

  

Given a file containing test scores, one per line, we want to havea 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 contains75987510021668315then running your program should look like (in Spyder):Enter the scores file: scores.txtscores.txtEnter the output file: scores_sorted.txtscores_sorted.txtWhen you look at the contents of scores_sorted.txt you should see0:  151:  212:  663:  754:  755:  836:  987: 100(Output the indices using two integer spaces {:2d} and the scores using three {:3d}.) You only need to submit the Python file. We will test with the example above and with a new file you have not seen.       Computer Science Engineering & Technology Python Programming CSCI 1100

Don't use plagiarized sources. Get Your Custom Essay on
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…
Just from $13/Page
Order Essay
  

Leave a Reply

Your email address will not be published.

Related Post

Open chat
💬 Need help?
Hello 👋
Can we help you?