I have been messing around with some code, trying to create a function for work planning. However I am stuck and wondered if someone could help? Thanks
class Work_plan(object):
def __init__(self,hours_work,work_len, work_des):
self.hours_work = hours_work
self.work_len = work_len
self.work_des = work_des
work_load = []
hours_worked = []
if hours_worked > hours_work:
print "Too much work!"
else:
work_load.append(work_des)
hours_worked.append(work_len)
print "The work has been added to your work planning!"
work_request = Work_plan(8, 2, "task1")
Work_plan
print work_load
it comes up with the error: NameError: name 'work_load' is not defined