title: Combination Lock Program
body: <p>Me and my partner have been working on this for a few hours and can't figure this out. The directions are vague in some areas and our professor did not do a good job of breaking it down to help us. Here is a link to the directions. I believe they are not very clear but please correct me if I am wrong and just overthinking it <a href="https://imgur.com/a/huHnwos" rel="nofollow noreferrer">https://imgur.com/a/huHnwos</a></p>
  
  <p>I believe that our biggest problems are the unlock(combination) and set_new_combination(new_combination) methods. I can figure out the <strong>str</strong>() method as that one isn't very hard to do. We've tried the things our professor has told us to try but they have been unsuccessful.</p>
  
  <pre><code>class Lock:
      def __init__(self, combination = 0):
          self.combination = combination
          self.locked = False
  
      def lock(self):
          self.locked = True
  
      def unlock(self, combination):
          if combination == True or combination == 0:
               self.locked = False
  
      def set_new_combination(self, new_combination):
          if self.locked == False:
              self.combination = new_combination
  
     def is_locked(self):
          if self.locked == True or self.combination == True:
              return True
          else:
              return False
  
      def __eq__(self, other):
          if other is not None and type(other) == type(self):
              if self.combination == other.new_combination:
                  return False
  
      def __str__(self):
          return self.combination, ',', self.locked
  </code></pre>
  
  <p>The expected result should be a working basic combination lock.</p>