code: def solve(self, max_worlds=10000, silent=False):
          
          self.num_worlds = 0
          num_unhappy = 0
          for tax_rate in range(self.tax_range[0],self.tax_range[1]):
              for equity in range(self.equity_range[0],self.equity_range[1]):
                  for tradition in range(self.tradition_range[0],self.tradition_range[1]):
                      self.num_worlds += 1
                      if self.num_worlds > max_worlds:
                          break
                      w = World(str(self.num_worlds).zfill(6), [5000, tax_rate/10, tradition/10, equity/10])
                      world_happiness = 0
                      num_unhappy = 0
                      for person in self.all_people:
                          wh = Happiness(person, w)
                          world_happiness += wh.rating
                          if wh.rating < 0:
                              num_unhappy += 1
                      if world_happiness > self.net_happiness:
                          self.net_happiness = world_happiness
                          self.unhappy_people = num_unhappy
                          if not silent:
                              print('found better world - ' + w.nme + ' = ' + str(world_happiness) + ' - total unhappy_people = ' + str(self.unhappy_people))
docs: find the best world to make people happy