class Operation:

    def __init__(self, machine, duration, job_model, job_id):
    	self.machine = machine
    	self.duration = duration
    	self.job_model = job_model
    	self.job_id = job_id
    	self.dependencies = []

    def __str__(self):
    	return ("Job#" + str(self.job_model) + 
    	" Machine#" + str(self.machine) + " Duration=" + str(self.duration))

    def print_dependencies(self):
    	if len(self.dependencies) > 0:
    		print(str(self) + " depends on ")
    		for operation in self.dependencies:
    			print(str(operation))

class Operation:

    def __init__(self, name, machine, duration, job_model, job_id):
    	self.name = name
    	self.machine = machine
    	self.duration = duration
    	self.job_model = job_model
    	self.job_id = job_id
    	self.dependencies = []

    def __str__(self):
    	return ("Name: " + str(name) + " Machine: " + str(self.machine)
    		+ " Duration: " + str(self.duration) + "Job model: " + str(self.job_model) + "Job ID: " + str(self.job_id))

    def print_dependencies(self):
    	if len(self.dependencies) > 0:
    		print(str(self) + " depends on ")
    		for operation in self.dependencies:
    			print(str(operation))

Update str() and add comments
Update str() and add comments

  class Operation:
  
-     def __init__(self, machine, duration, job_model, job_id):
+     def __init__(self, name, machine, duration, job_model, job_id):
+     	self.name = name
      	self.machine = machine
      	self.duration = duration
      	self.job_model = job_model
      	self.job_id = job_id
      	self.dependencies = []
  
      def __str__(self):
-     	return ("Job#" + str(self.job_model) + 
-     	" Machine#" + str(self.machine) + " Duration=" + str(self.duration))
+     	return ("Name: " + str(name) + " Machine: " + str(self.machine)
+     		+ " Duration: " + str(self.duration) + "Job model: " + str(self.job_model) + "Job ID: " + str(self.job_id))
  
      def print_dependencies(self):
      	if len(self.dependencies) > 0:
      		print(str(self) + " depends on ")
      		for operation in self.dependencies:
      			print(str(operation))
  
Update str() and add comments
## Code Before:
class Operation:

    def __init__(self, machine, duration, job_model, job_id):
    	self.machine = machine
    	self.duration = duration
    	self.job_model = job_model
    	self.job_id = job_id
    	self.dependencies = []

    def __str__(self):
    	return ("Job#" + str(self.job_model) + 
    	" Machine#" + str(self.machine) + " Duration=" + str(self.duration))

    def print_dependencies(self):
    	if len(self.dependencies) > 0:
    		print(str(self) + " depends on ")
    		for operation in self.dependencies:
    			print(str(operation))

## Instruction:
Update str() and add comments
## Code After:
class Operation:

    def __init__(self, name, machine, duration, job_model, job_id):
    	self.name = name
    	self.machine = machine
    	self.duration = duration
    	self.job_model = job_model
    	self.job_id = job_id
    	self.dependencies = []

    def __str__(self):
    	return ("Name: " + str(name) + " Machine: " + str(self.machine)
    		+ " Duration: " + str(self.duration) + "Job model: " + str(self.job_model) + "Job ID: " + str(self.job_id))

    def print_dependencies(self):
    	if len(self.dependencies) > 0:
    		print(str(self) + " depends on ")
    		for operation in self.dependencies:
    			print(str(operation))
