Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python Question 8 (25p): Please write two functions that calculate your score average for your quizes and assignments. The student scores will be read from

image text in transcribed
python
Question 8 (25p): Please write two functions that calculate your score average for your quizes and assignments. The student scores will be read from a input file that you create which has your grades in the following format: Student id, then your 10 quiz scores, then your 13 assignment scores, all semi-colon (separated StudentID. Out21:Qui22.Quiz3,Quiz4 Qui25.0.26.Oui Oui Oui Ouiz 10 Assignment Assi gnment2: Assignments Assignment Assignments Assignment Assignment-Assignment Asse gnmentX1 AssignmentX2 Assignment.x3 AssignmentX4 Assignments For example, a student withid 1111111111 who has the following grades Count 1 Quizzes 0 100 100 80 60 80 90 20 100 Assignments 000 75 80 100 es 50 Assignments O 20 50 60 100 Would have a single line of entry in their input but 1111111111,0,100,0:100,00 60,80.90 20:100,0,0,0.75.80-100,85500:20.50.60,400 1111111111:0;100;0:200; 80:60;00,20:20;100:8:030:25:00;100;5,5038:20758,60;30 Your first function (studentDictFromFile(eeds to read from this file in the same folder wie the code) in order to fill a dictionary with student id as a key which has a two dimensional listas variables for you quizes and assignments STUDENT DICTIONARY KEYS VALVES Studio [ [21. 8.12.-5.1.12) [ Asignats, Assignmed8], [Assignmet Xl - Anyamexs] The output of this first function needs to be the dictionary you have filed in based on the input it contents. Note that you have a list for your quiz scores, a list for your assignments and a list for your extra assignments (Assignment inside a single ist. For the given example, the dictionary format is. (1111111111 10.100, 0.100, 80, 60, 80, 90,20.10.10.0.0, 75, 80, 100, 85,50), 10, 20, 50, 60, 1001 Your second function calculate Average GradesfinputDictionary)) should calculate the average score for your quizzes and assignments once this dictionary is given as an input. You quiz averages should be the average of your best 8 quizzes Note that this list is not ordered) For the assignments, you need to get the average of the best scores from assignments and assignmentX lists. The average scores should be printed to the screen with the student ID. For the sample input the output should be Student ID: 11111111 Average Quiz Grade: 67.5 Student ID: 11111111 Average Assignment Grade: 75.8

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

More Books

Students also viewed these Databases questions

Question

3. Discuss the process of behavior modeling training.

Answered: 1 week ago