Question: Class Course This class represents a course that a group of students is enrolled in. They will be assigned assignments when enrolled in this course.

Class Course

This class represents a course that a group of students is enrolled in. They will be assigned assignments when enrolled in this course. This object will be used to calculate aggregate student statistics.

__init__(self, students: list):

"""

Constructs a course with the specified list of students

:param students: A list containing one or more students

"""

get_mean_grade(self) -> float:

"""

Returns the numerical value of the class mean (average) grade.

:return: The average student grade

"""

get_max_grade(self) -> float:

"""

Returns the highest grade in the class.

The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned

when the student was in another class.

:return: The highest grade in the class

"""

get_min_grade(self):

"""

Returns the lowest grade in the class.

The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned

when the student was in another class.

:return: The lowest grade in the class

"""

get_median_grade(self) -> float:

"""

Calculates and returns the median (middle value) of all the student's grades in this course

The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned

when the student was in another class.

:return: The median grade

"""

get_grade_variance(self) -> float:

"""

Calculates and returns the sample variance of all the student's grades in this course

The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned

when the student was in another class.

:return: The sample variance of the grades

"""

get_grade_std_dev(self) -> float:

"""

Calculates and returns the sample standard deviation of all the student's grades in this course.

The grades used in the calculation come from the student.get_grade(), it does not care if a grade was earned

when the student was in another class.

:return: The sample standard deviation of the grades

"""

assign(self, name: str, difficulty: float) -> None:

"""

This creates an assignment using the parameters specified, then assigns it to all of the students in this

course, by calling the assign method on each student. Subsequent invocations to the statistics methods above

should reflect the changes made by this method after it is called. In other words if a very difficult

assignment is assigned the course mean should be less after.

:param name: The name of the assignment

:param difficulty: The level of difficulty of the assignment

:return: None

"""

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 Programming Questions!