Exercise 2: Name your program Lab12_ex1_Id.py Write a Python program that reads from each line of an input file called grades.txt, a student id followed by the student grades in 3 exams. The program...


Exercise 2: Name your program Lab12_ex1_Id.py<br>Write a Python program that reads from each line of an input file called grades.txt, a student id followed<br>by the student grades in 3 exams. The program will then calculate the average of the student and save in<br>a file called results.txt the student id followed by the calculated average. For example, if the grades.txt<br>contains<br>siii 60 60 90<br>S222 89.5 90 89<br>S333 42 50 43<br>The file results.txt will contain<br>siii: 70.00<br>S222: 89.50<br>S333: 45.00<br>

Extracted text: Exercise 2: Name your program Lab12_ex1_Id.py Write a Python program that reads from each line of an input file called grades.txt, a student id followed by the student grades in 3 exams. The program will then calculate the average of the student and save in a file called results.txt the student id followed by the calculated average. For example, if the grades.txt contains siii 60 60 90 S222 89.5 90 89 S333 42 50 43 The file results.txt will contain siii: 70.00 S222: 89.50 S333: 45.00

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here