Question: I have a lab assignment for my intro to programming class using python. In this lab we are supposed to read in a text file

I have a lab assignment for my intro to programming class using python. In this lab we are supposed to read in a text file with grades.

The text is this:

Homework 10% 40/40, 10/40,30/40, 4/5,18/40,40/40,76/80,10/10 Quizzes 10% 10/10,10/10,8/10,9/10,0/10,10/10,6/10 Tests 35% 89/100, 97/100 Projects 30% 56/60,60/60 Final 15% 495/550

**We are not allowed to edit the above text**

I already have functions that can work compute the averages of the lists, weights, and the final grade. But I cant seem to get this part working correctly. I need to separate the score lists into scores earned and total scores. But I am hitting a wall. Any help is appreciated.

This is my current code:

I have a lab assignment for my intro to programming class using

def get_file(fileName): 1 score_dict - th infile - open(fileName , 'r') for line in infile: lines-line.strip() lines-line.split(' ') items'".join(lines [2:]) itemsitems.rstrip() items items. split(' , ? ) score dict [lines [01items return score dict

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!