These are chat archives for andela/andela-21-lite

22nd
May 2016
mayreeh
@mayreeh
May 22 2016 15:45
who is online at the moment?
mayreeh
@mayreeh
May 22 2016 15:52

class User(object):

def __init__(self,name,emp_id,phone_number):
    self.name = name
    self.emp_id = emp_id
    self.phone_number = phone_number

def add_details(self):
    print self.name

and

from user import User
class Departmenr(User):

def __init__(self , dep_name):
    User.__init__(self,name,emp_id,phone_number)

def add_department(self):
    print "adding departments"

calling the Department class this way

dep = Departmenr('Andela')

but I get global name 'name' is not defined.

Someone help where I am going wrong. I'm still stuck on classes :(