我正在上编程课,对于其中一个测试,我需要创建一个继承自已创建类的类。这是老师教我做的代码,但它似乎不起作用:
class Intern(Employer):
def __init__(self, last_name, first_name, address, phone, email, end_date):
Employer(last_name, first_name, address, phone, email)
self.end_date=end_date
def intern_info(self):
self.print_info()
print self.end_date