This is my code:
class Employee(object): """Models real-life employees!""" def __init__(self, employee_name): self.employee_name = employee_name def calculate_wage(self, hours): self.hours = hours return hours * 20.00 # Add your code below! class PartTimeEmployee(Employee): def calculate_wage(self, hours): self.hours = hours return hours * 12 emp = Employee('Jake') pt_employee = PartTimeEmployee('Lawrence') print emp.calculate_wage(10) print pt_employee.calculate_wage(10)
It is correct but I don’t fully understand why do we write: “self.hours = hours”… what is the reason?
<do not remove the three backticks above>