14/18 Im kinda lost here


#1


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
    def full_time_wage(self, hours):
        return super(PartTimeEmployee, self).method(args)
#  def __init__(self, milton):

miltosn = PartTimeEmployee(10)
print miltosn.full_time_wage

I get error:
Oops, try again. Did you create an instance of the PartTimeEmployee class called milton?

I'm kinda lost


#2

You created a variable with a similar but still different name.

Also, it's rather odd for a method to both compute something and set an attribute, I'm not so sure if that's what they're meant to do (calculate_wage)


#3

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

It works, but how?


#4

I tested your code and it does pass but i don't get the right answer.
Your gonna have to change milton = PartTimeEmployee(10) to milton = PartTimeEmployee("AnyName")
and then print milton.full_time_wage(10). I'm still trying to figure out how the code works. i only got it right because of the instructions.