This Looks like a Job for


#1

I Passed the lesson but I’m curious as to what the python:1: SyntaxWarning: import * only allowed at module
is indicating?

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

Heres what the consle prints out

200.0
python:1: SyntaxWarning: import * only allowed at module level

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

class PartTimeEmployee(Employee):
  
  def calculate_wage(self, hours):
    self.hour = hours
    return hours * 12 
  
  def full_time_wage(self, hours):
    return super(PartTimeEmployee, self).calculate_wage(hours)
  
milton = PartTimeEmployee("Milton")

print milton.full_time_wage(10)



#2

this seems to be cause by codecademys validation of the exercise, if you really want to know, python has a section about warnings:

https://docs.python.org/2/library/warnings.html


#3

Oh i understand now i find the interpreter on here can be a little buggy at times. sometimes i will type and nothing will show up at all.
Thanks Mate :slight_smile:


#4

Thanks, it helped me too! :slight_smile: Have a nice day


#5

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