subject

Write a program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm 1 score, Midterm2 score, and the Final score of a student. A sample of the student information is provided in Studentinfo. tsv. Assume the number of students is at least 1 and at most 20. The program performs the following tasks: Read the file name of the tsv file from the user • Open the tsv file and read the student information • Compute the average exam score of each student Assign a letter grade to each student based on the average exam score in the following scale A: 90 = X • B. 80 =< X < 90 • C: 70 =< X < 80 D: 60 =< X < 70 FX<60 Compute the average of each exam Output the last names, first names, exam scores, and letter grades of the students into a text file named report. txt Output one student per row and separate the values with a tab character • Output the average of each exam, with two digits after the decimal point, at the end of report txt. Hint: Use the format specification to set the precision of the output. Ex If the input of the program is: Student Info. tav . and the contents of Studentinfo. ts are: Barrett Edan 70 45 59 Bradshaw Reagan 96 97 88 Charlton Calus 73 94 80 Mayo Tyrene 88 51 Sun Brenda 90 86 45 the file report txt should contain Darrett dan 70 Bradsha Rengan 96 Charlton 93 Mayo Tyre se BB 6 Brenda 90 45 59 02 GB 94 30 36 D 23 etv SR Lr main. py Load default template with open('Student Info. tsv","") as if : #file open with open('report. txt", "W") as wf: #we write to new file report. txt Pilel - open('reprt. txt', 'a') for line in c: line - line. strip) 1st - line. split("\t") sum - int (1at121)+int (1st (31)+int (st (411 average - bum/3 if average 90 gradom 'A' 1 elit average - BO: gradewa elif average > 701 gradec elit average > 601 grade else grade - wr. write(linet grade.\n").writen into wr written the new File Titel weite("Avaragent side ). 40, medtem 76.60, final 61.60) nou Studenti foto Barrett Sead 70 55 Your le con Cars Mayo stem Tyres 23 53 10 45 59 Expected content Charlton Mayo 61 36 sistem... 16.00, tinal. Outes Shirts below 013 Tout stolta 45 24 $ 80 888 $ A % 5 * 6 & 7 8 9 0 W R. T Y e st U 0 a F To Brenda 10 Bartlepe37-5555 hartt dan Baba Heagan 855 Cabott 85 Charlton rynna 9510 2 Moldes*7146 Rigonya-5-5-5600 Hayo Tyres 576 Mir Johnny66 Precauty Hobitonelynda 496-30-550 Stern Brenda 650 Statytomelo 51-531 Expected file content Come output Output offers so highlights below the © Bert an Badan Your le content 89 0.00 Previous submissions 23 V LE $ Il $ 4 % 5 & 4 6 7 00 * 9 0 R T 0 Р

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:00
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
Word vocabulary words: print, proofread, status line, graphics, font effects, left margin, justification, line spacing, copy/paste, data. review words: font point, bold, save, center, error. fill in the correct word for the definition and then transfer the letters to the appropriate spot by number. some numbers will be found multiple times. you will end up with a quotation about…… what else? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 k 16 17 18 19 20 21 22 23 24 25 8 27 28 29 w 31 32 k 34 35 36 w h 39 40 41 42 8 44 45 46 47 48 49 50 51 52 53 54 55 .1. a software function that records keystrokes on a disk or drive so information can be 5 4 52 9 later retrieved. p n 2. to produce a paper copy of information. 10 7 12u n 3. a display that shows the location of the cursor, pages, etc. 45 46 18 27 36 20 42p4. pictures or images, located in clip art or other files. 6 24 44 28 34 49 555. any mis-stroke of a key. 47 41 48 2 10 n6. allows major changes to the font such as shadow, emboss, etc. 21 25 46 35 23 21 29 14 22 17 n7. a feature that centers lines of text horizontally. 49 53 46 9 51 p8. size of the font 31 16 22 b l 9. a feature that prints designated text darker than the rest to add emphasis. 32 3 . p10. to compare copy on a display screen or printout to the original 24 39 25 23 54 9 50 3 and correct errors. j un 11. a feature that allows text to be aligned at the left 11 12 7 21 16 49 40 46 34 2 and right margins. leftn 12. amount of blank space on the left side of the paper. 8 18 41 6 34 linen 13. number of blank lines between lines of text. 17 4 49 13 1914. any information inputted into the computer. 3 4 46 44 p /p15. feature that duplicates text from one location and places it in another.
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
question
Computers and Technology, 23.06.2019 10:00
Now, open this passage to read about fafsa requirements. describe the information you will need to provide in order to complete a fafsa. list at least three of the required documents you must include.
Answers: 3
You know the right answer?
Write a program that reads the student information from a tab separated values (tsv) file. The progr...
Questions
question
Mathematics, 06.06.2020 22:57
question
Mathematics, 06.06.2020 22:57
question
Mathematics, 06.06.2020 22:57
question
Mathematics, 06.06.2020 22:57
question
Health, 06.06.2020 22:57
question
Mathematics, 06.06.2020 22:57
Questions on the website: 13722363