Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For mydata2.txt please create it yourself. Please share the answers in a py file!! This assignment is to improve the score system we had for

For "mydata2.txt" please create it yourself. Please share the answers in a py file!!

image text in transcribed
This assignment is to improve the score system we had for Assignment #1. You need to write a Python program that: (1) Reads from "mydata2.txt" a set of students and their scores (one line per student), where each line contains the SID (which is a string) and his/her homework grades (which are integers). The number of students is not known in advance. (2) Computes the average score (as an integer) for each student. The average of each student is computed based on (grade total / number of homework assignments). (3) Prints the SID, the homework grades, and the average grade of each student. (4) Computes and reports the average of the class (as an integer): class average = sum of averages / number of students. (5) Computes and reports the student who has the highest average. For example, your program should report something like: SID 1001 HW1 20 HW2 30 HW3 100 Avg 50 SID 1002 HW1 80 HW2 90 HW3 100 Avg 90 SID 1003 HW1 100 HW2 100 HW3 100 Avg 100 Class Average is 80 The student with SID 1003 is the champion

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions