"This Looks Like A Job For"


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

https://www.codecademy.com/courses/learn-python/lessons/introduction-to-classes/exercises/this-looks-like-a-job-for?action=lesson_resume

<In what way does your code behave incorrectly? Include ALL error messages.>

It does not execute the desired function. Not exactly sure where I am going wrong. The message that comes up reads:

“<bound method PartTimeEmployee.full_time_wage of <PartTimeEmployee object at 0x7fb29adb6290>>”

…and also…

“Did you create an instance of the PartTimeEmployee class called milton?”

<What do you expect to happen instead?>

```python
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

<do not remove the three backticks above>

#2

Try Milton like this milton


#3

Duh. It worked! Thanks!


#4

You’re welcome, always read and understand the instructions cause a . can keep you at an exercise for quite sometime, goodluck.


#5

Yea. I’ve noticed ha


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.