Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    It is important to consider the case when i and n/i are both square root of n.

  • Default User Avatar

    There is no test to verify if something other than list is passed. In this case an exception is expected to be thrown. I suggest the following test case.

    test.describe("copy_list should raise an exception if the passed object is not list")
    try:
      d = {'key1': 'value1', 'key2': 'value2'}
      test.expect(False, "copy_list({0}) returned {1}; should have raised an exception".format(d, copy_list(d)))
    except:
      test.expect(True)