Question: Project 4 Goals Practice data processing using Lists, Dictionaries, and Sets Notice: For each project, you can submit at most 1 0 times. In case
Project
Goals
Practice data processing using Lists, Dictionaries, and Sets
Notice:
For each project, you can submit at most times. In case of issues, you should approach TAs during office hours instead of wasting your submission chances.
The final score on Vocareum is tentative and subject to revision after being processed through plagiarism software.
Read each project description carefully. Just because your code works on your machine does not mean it is correct. Vocareum grades each submission based on the technical specifications in the project description. Not satisfying them gives low or zero points. We do not do manual reviews or regrading if your submission does not follow the technical specifications.
You can find files for testing your project in the work folder on Vocareum.
Description
The university is developing a course management system that automatically calculates final grades based on the submission records of students. The course management system team hired you to implement the calculation process for any given course, which means you are required to write a Python program to read the submission records from students and calculate the final grades.
Files location and summary:
The example input files are located under startercode in Vocareum.
Each file contains data in the form of commaseparated values commas mark columnwise separation For each file, data is arranged as below:
StudentInfo.txt
tableIDName,AgeStringStringString
tableSubmissionRecordtxtIDAssignment's Name,Score,DateStrinString: egIntStringg"Lab "Midterm"
AssignmentInfo.txt
tabletableAssignmentsNameWeight,DeadlineStringFloatString
The following steps summarize the project tasks:
Task : program set up and adding brief description comments in the header area.
Task : implement the following functions, that will read data from a file and return a list of dictionaries, where each dictionary will represent the data in one line of the input files:
readStudentInfo fileName
readSubmissionRecord fileName
readAssignmentInfofileName
Task : Implement the getScore function that returns a list of dictionaries containing the student's information and their scores for each assignment.
Task : Implement the computeFinal Grades function that returns a list of dictionaries that contains all the information from Task as well as their final grades.
Task : Implement the computeAverage function that returns a dictionary that contains the average score for each assignment and final grade.
Task : the main function.
Grading note:
Your code should be general and should not make any assumptions, eg number of lines, content, etc. For example, we may pass a file with the same format but different content.
Task : Setup and comments
Open a new, blank Python program window. Save the file as
projectpy At the top of the file, add the comments.
Task : Implement readStudentInfo, readSubmissionRecord, readAssignmentInfo functions
In this task, you will write the functions that read data from files and append the data into dictionaries. This task is often called data preprocessing.
def readStudentInfofileName:
Parameters: filename String
Return value: List of Dictionaries where each dictionary represents one line from the file.
Description: The function reads each student's data from a file and returns a list of dictionaries. All the data needs to be a String type.
Sample data from Studentinfo, txt
Wilhelm,
Young,
Sample output from function:
studentInfo readStudentInfoStudentInfotxt
print studentInfo
ID: 'Name': 'Wilhelm', 'Age': ID:
'Name': 'Young', 'Age':
def readSubmissionRecordfileName:
Parameters: filename String
Return value: List of Dictionaries where each dictionary represents one line from the file.
Description: The function reads the submission information from a file and returns a list of dictionaries. You need to convert the third entry of each row the score of the submission into an Int type, and the rest needs to be a string type.
Sample data from SubmissionRecord.txt
Lab,
Lab,
Sample output from function:
s submissionRecord readSubmissionRecord SubmissionRecordtxt
Sample output:Task : Implement the getScore functiondef getScorestudentInfo submissionRecord, assignmentInfo:Parameters: studentInfo List submissionRecord Listassignment InfoListAll parameters are the return values of Task Return value: List of Dictionaries where each dictionary contains the students' data and their respective scores for each assignment.Description: This function returns a list of dictionaries. Each dictionary contains students' information included in the parameter studentInfo and their scores for each assignment. You can get this information by going thro
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
