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 14:40
You begin your first day of responsibilities by examining the recent is security breach at gearup to get ideas for safeguards you will take. at gearup, criminals accessed the company's improperly-secured wireless system and stole customers' credit card information as well as employee social security numbers. what kind of computer crime did gearup face?
Answers: 3
question
Computers and Technology, 22.06.2019 16:20
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
question
Computers and Technology, 24.06.2019 06:00
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior to sending the first ping request
Answers: 1
You know the right answer?
Write a program that reads the student information from a tab separated values (tsv) file. The progr...
Questions
question
Physics, 12.10.2021 04:10
question
Mathematics, 12.10.2021 04:10
question
Mathematics, 12.10.2021 04:10
question
Social Studies, 12.10.2021 04:10
Questions on the website: 13722367