Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

1 How to measure long-run economic growth

Answered: 1 week ago