This looks for a job


#1



i am getting the output 200 but I get an error saying
200.0
Traceback (most recent call last):
File "python", line 19, in
NameError: name 'full_time_wage' is not defined

also can you please explain me how the code works ...im not able to understand this concept


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 self.hours*12.00
    def full_time_wage(self, hours):
        return super(PartTimeEmployee, self).calculate_wage(hours)
milton = PartTimeEmployee("Milton")
print milton.full_time_wage(10)   
print full_time_wage

Replace this line with your code.


#2

I think your last print statement is extra.

Basically you gotta think of objects in the same way you think of lists like:
my_list = [10] is like how we initialize milton = PartTimeEmployee("milton")
my_list.append[32] is like milton.calculate_wage(10)

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.00
    def full_time_wage(self, hours):
        return super(PartTimeEmployee, self).calculate_wage(hours)

milton = PartTimeEmployee("Milton")
print milton.full_time_wage(10)