      "\n",
      "class TestMaximingXor(object):\n",
      "\n",
      "    def test_maximizing_xor(self):\n",
      "        assert_equal(max_xor(10, 15), 7)\n",
      "        print('Success: test_maximizing_xor')\n",
      "\n",
      "\n",
      "def main():\n",
      "    test = TestMaximingXor()\n",
 
</s> remove     "        assert_equal(max_xor(10, 15), 7)\n",
 </s> add     "        solution = Solution()\n",
    "        assert_equal(solution.max_xor(10, 15), 7)\n", </s> remove     "def max_xor(lower, upper):\n",
    "    # TODO: Implement me\n",
    "    pass"
 </s> add     "class Solution(object):\n",
    "\n",
    "    def max_xor(self, lower, upper):\n",
    "        # TODO: Implement me\n",
    "        pass" </s> remove     "def max_xor(lower, upper):\n",
    "    result = 0\n",
    "    for l in range(lower, upper + 1):\n",
    "        for u in range(lower, upper + 1):\n",
    "            curr = l ^ u\n",
    "            if result < curr:\n",
    "                result = curr\n",
    "    return result"
 </s> add     "class Solution(object):\n",
    "\n",
    "    def max_xor(self, lower, upper):\n",
    "        result = 0\n",
    "        for l in range(lower, upper + 1):\n",
    "            for u in range(lower, upper + 1):\n",
    "                curr = l ^ u\n",
    "                if result < curr:\n",
    "                    result = curr\n",
    "        return result" </s> remove         assert_equal(max_xor(10, 15), 7)
 </s> add         solution = Solution()
        assert_equal(solution.max_xor(10, 15), 7) </s> remove    "pygments_lexer": "ipython2",
   "version": "2.7.10"
 </s> add    "pygments_lexer": "ipython3",
   "version": "3.5.0"
    "        solution = Solution()\n",
    "        assert_equal(solution.max_xor(10, 15), 7)\n",
      "\n",
      "class TestMaximingXor(object):\n",
      "\n",
      "    def test_maximizing_xor(self):\n",
    "        solution = Solution()\n",
    "        assert_equal(solution.max_xor(10, 15), 7)\n",
      "        print('Success: test_maximizing_xor')\n",
      "\n",
      "\n",
      "def main():\n",
      "    test = TestMaximingXor()\n",
keep keep keep keep replace keep keep keep keep keep
 Move xor challenge solution to a class (#143) 
online_judges/maximizing_xor/maximizing_xor_challenge.ipynb