Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

looking for help on this problem! 1. Task In this class, like many others, assignments are clustered by type: exams, programming assignments, etc. Each assignment

looking for help on this problem!

image text in transcribedimage text in transcribed

1. Task In this class, like many others, assignments are clustered by type: exams, programming assignments, etc. Each assignment type has a given weight, and each assignment within a given type might also have a weight. For example, exams might be 50% of the overall grade and the final exam might be worth 1.5x as much as a midterm. Write a file gradebook.py that has (one or more) global gradebook dict, which stores a running total and cumulative weight for each supplied grade type ; and two functions to interact with that dict: 1.1. assignment (kind, grade, weight) The kind will be a string, and will indicate which group of assignments this one belongs to. It might be either a known kind or a new one The grade will be a number between 0 and 100, indicating how well the student did on this assignment. The weight is optional; if present, it indicates how much weight this assignment has compared to others of this kind. If not present, assume it is1 The behavior of this function is to add to the running total grade for the given kind, using a similar logic to what you used in PA 07- GPA but with a different running total for each kind, stored in a dict 12. total (proportions) Given a dict with keys as types of assignments and values as ratios of overall grade this type applies to, return the cumulative grade so far based on this set of proportions. You may assume the values in the dict total to 1.o. The given proportions may include assignment types that have never been sent to assignments(...; return the grade assuming the student got 0 in those missing assignments. The given proportions may fail to include some assignment types that were sent to assignments(...); those assignment types do not contribute to the returned grade. 1.3. Style matters In addition to functional correctness, some points will be reserved for 1. having good variable names 2. having meaningful docstrings for all functions you write 1. Task In this class, like many others, assignments are clustered by type: exams, programming assignments, etc. Each assignment type has a given weight, and each assignment within a given type might also have a weight. For example, exams might be 50% of the overall grade and the final exam might be worth 1.5x as much as a midterm. Write a file gradebook.py that has (one or more) global gradebook dict, which stores a running total and cumulative weight for each supplied grade type ; and two functions to interact with that dict: 1.1. assignment (kind, grade, weight) The kind will be a string, and will indicate which group of assignments this one belongs to. It might be either a known kind or a new one The grade will be a number between 0 and 100, indicating how well the student did on this assignment. The weight is optional; if present, it indicates how much weight this assignment has compared to others of this kind. If not present, assume it is1 The behavior of this function is to add to the running total grade for the given kind, using a similar logic to what you used in PA 07- GPA but with a different running total for each kind, stored in a dict 12. total (proportions) Given a dict with keys as types of assignments and values as ratios of overall grade this type applies to, return the cumulative grade so far based on this set of proportions. You may assume the values in the dict total to 1.o. The given proportions may include assignment types that have never been sent to assignments(...; return the grade assuming the student got 0 in those missing assignments. The given proportions may fail to include some assignment types that were sent to assignments(...); those assignment types do not contribute to the returned grade. 1.3. Style matters In addition to functional correctness, some points will be reserved for 1. having good variable names 2. having meaningful docstrings for all functions you write

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

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions

Question

What is the growth rate of GDP per capita?

Answered: 1 week ago