Suppose you are given a text file “students.txt” that contains the data of students. Every line in the file is composed by the first name, the last name, the score of the test1, the score of the test2 and the grade of the final.
Write a program that:
a. Read the file “student.txt”
b. Create a new file named “Result.txt”. Write in this file the list of the admitted students (total score >= 60). Each line should contain, the first Name, Last Name, the total score and the string “PASS”.
The total score is calculated as the following: total= Test1*0.2+Test2*0.2+Final*0.6
Answers
Answered by
0
Answer:
Explanation:
For reading the file :-
(python):-
f = open('student.txt','r')
f.read()
o = open('result.txt','w')
o.write(f)
Plz mark as brainliest.
Similar questions