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 quizzes and assignments. The student scores wil be read from

python image text in transcribed
Question 8 (25p): Please write two functions that calculate your score average for your quizzes and assignments. The student scores wil be read from a input dle that you create which has your grades in the following format Student id, then your 10 quz scores, then your 13 assignment scores al colon (separated Studenti.Quie1 Quic2 Quiz3Qui Quiz Quad Qz7.02.10: Assignment Assi gment2.Assignment Assignment Assignments Assignment Assignment Assignment Assi gnment1 Assignment2 Assignment Assignment Assignments For example, a student with d 1111111111 who has the following grados Court + 12 3 10 Quizzes 0 1000 10000000020 100 Assignments 0 jo 100 85 50 Assignments 0 2050 60 100 Would have a single line of entry in their input.but file 1111111111:0,100:0.100.80.60,80,90,20,100.0.0.0.75,80,100,85 50:0:20,50,60,100 1111111111010001001000:00:90:20:10:0:0:0:75:60;100;5:50:0:20:00:30 Your first function (studentDictFromFile(needs to read from this file in the same folder with the code) in order to fa a dictionary with student id as a key which has a two dimensionalistas variables for you quiz2009 and assignments VALUES STUDENT DICTIONARY KEYS 8:10 [ [8421, 8012 Stubito [Asgaents. Assignews] [Assignnet Xl, - Asymalxs}} The output of this first function needs to be the dictionary you have filed in based on the input.txt contents. Note that you have a list for your quz scores, a list for your assignments and a ist for your extra assignments (Assignment inside a single list. For the given example, the dictionary format is (1111111111 10.100. 0.100.80.80.80.90.20.10110, 0, 0.75, 80, 100, 85,503 10.20.50.60, 1000 Your second function calculatoAverageGrades inputDictionary)) should calculate the average score for your quizzes and assigments once this dictionary is given as an input Your que averages should be the average of your best quizzes (Note that this list is not ordered). For the assignments, you need to get the average of the best scores from assignments and assignmentxists. The average scores should be printed to the screen with the student. For the sample input the output should be Student ID: 11111111 Average Quiz Grade: 67.5 Student ID: 11111111 Average Assignment Grade: 75.8 Modify the input.bet fe so that student id is set to your student id. Place a screenshot of the code output after your code 15 points) Note that you will not get any scores if you do not follow the guidelines in the question description regarding your dictionary format and function specifications

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions