Exercise passed but getting error code in console? 14/18


#1

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

Im getting this message afterwards:
<bound method PartTimeEmployee.full_time_wage of <PartTimeEmployee object at 0x7fd7aed03cd0>>
python:1: SyntaxWarning: import * only allowed at module level

It doesn’t seem to be printing result properly.


#2

You’re printing a method. Perhaps you meant to call the method and print the result?


#3

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