A binary file named “TEST. dat” has some records of the structure [TestId, Subject, MaxMarks, ScoredMarks) Write a function in Python named DisplayAvgMarks(Sub) that will accept a subject as an argument and read the contents of TEST. dat. The function will calculate & display the Average of the ScoredMarks of the passed Subject on screen.

A binary file named “TEST.dat” has some records of the structure [TestId, Subject, MaxMarks, ScoredMarks] Write a function in Python

Read more