Question: below _ pay _ average Define a function named below _ pay _ average with one parameter of type list [ Employee ] ( Employee

below_pay_average
Define a function named below_pay_average with one parameter of type list[Employee](Employee is defined in the provided data.py file). This function must return a list (of type List[str]) of the names of employees that are being paid less than the average pay of all employees in the list. The implementation of this function will require computing the average employee pay rate. Your function should work properly when the input list is empty. This function might be used to identify those employees whose pay may be artificially lower than their coworkers.# Abbreviated representation of an employee.
class Employee:
# Initialize a new Employee object.
# input: the employee's name as a string
# input: the employee's pay rate as an integer (for simplicity)
def (self, name: str, pay_rate: int):
self.name = name
self.pay_rate = pay_rate
# Provide a developer-friendly string representation of the object.
# input: Employee for which a string representation is desired.
# output: string representation
def repr (self):
return "Employee('{}',{})".format(*args:
self.name, self.pay_rate)
# Compare the Employee object with another value to determine equality
# input: Employee against which to compare
# input: Another value to compare to the Employee
# output: boolean indicating equality
def eq (self other):
return (other is self or
type(other)== Employee and
self.name = other. name and
self.pay_rate = other.pay_rate)
 below_pay_average Define a function named below_pay_average with one parameter of type

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!