Write a function to write data into binary file marks.dat and display the records of students who scored more than 95 marks
Answers
Answer:
Given a binary file “STUDENT.DAT”, containing records of the following type: [S_Admno, S_Name, Percentage] Where these three values are: S_Admno –Admission Number of student (string) S_Name –Name of student (string) Percentage –Marks percentage of student (float) Write a function in PYTHON that would read contents of the file “STUDENT.DAT” and display the details of those students whose percentage is above 75.
Answer:
The function to write data into binary file marks.dat is:
Given a binary file "STUDENT.DAT" containing the following types of records:
[S Administration, S Name, Percentage]
Where these three values can be found:
Admission S Admno the number of students (string)
S Name -Student's name (string)
% -Percentage of student marks (float)
Creates a PYTHON function that reads the contents of the file "STUDENT.DAT" and displays the information for students with a percentage greater than 75.
Python Functions are a set of statements that perform a certain purpose.
With the def keyword, we may define a Python function.
After constructing a function, we may call it by using the function's name followed by parentheses holding the function's parameters.
The following are some of the benefits of using the service. A function can take as many parameters as it wants, separated by commas.
Learn more about python functions here:
https://brainly.in/question/29193878
Learn more about binary files here:
https://brainly.in/question/6033576
#SPJ2