Question: Lesson Assignment: GradeBook You will build a function that returns a letter grade for a student based on a set of points earned in her

 Lesson Assignment: GradeBook You will build a function that returns a

Lesson Assignment: GradeBook You will build a function that returns a letter grade for a student based on a set of points earned in her his classes. Every class will use the same letter grade scale and all classes use a 100 point scale. The data.py tab holds the data. The variable grade_scale represents the grading scale for a hypothetical university that uses the same scale across all classes grade_scalef "A+": "low": 96, "high":100, "gpa":4.0, "A" : {"low" : 93, "high":95, "gpa" :4.0), A-":low": 90, "high":92, "gpa":3.73 "B+: low": 86, "high":89, "gpa":3.3 "B" : {"low" : 83, "high":85, " " : 3.0), "B-": {"low" : 80, "high" :82, "gpa" :2 .7), "C+low": 76, "high":79, "gpa":2.3 "c" : {"low": 73, "high":75, "gpa " : 2.0), "c-": {"low" : 70, "high":72, "gpa" :1.7), The same module also holds the grades for a student student123f id": "smith123", "classes":[ "name": "stats 100", "points": 88, "credits": 4, "name": "cs 101", "name": "history 101", "points": 91, "credits":3, "name" "Pysch 201" "points": 86, "credits": 4], "points": 92, "credits":3, Part 1 Create a function named calculate_gpa that is given a grade_scale and a student (in that order). It calculates the overall gpa for that student. The student will be in the same format as the example student123 student. Hint: for student123 the overall gpa is 3.47 otes: the gpa for a specific class is found by looking up the points earned in that class in the grade_scale grade points for a class is the gpa for that class multiplied by the number of credit hours total grade points earned is a summation of creditsx gpa overall GPA is total grade points earned divided by total credits earned As an example, for stats 100: 88 points is a 3.3 gpa grade points would be 3.3 gpa x 4 credits Part 2 Create a function named get_letter_grade_v1. It is a function with two parameters grade_scale and a gpa (in that order) and it returns the letter grade. If the gpa is so low that it's below a 1.7, return a D Hint: for student123, the letter grade is B+

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!