Ad
  • Default User Avatar

    In Python, bool is an integer (i.e., isinstance(True, int) and issubclass(bool, int)), so they really should be treated as an integer. True == 1 and False == 0.

    I would suggest allowing either 1 or None as a solution for True, and None as the only solution for False.

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    If you were to include negative numbers, you must also include negative divisor. And if n is a divisor, -n is also a divisor, so all numbers would have an even number of divisors, meaning there is no point.

    "Divisors" of a number are usually constricted to positive integers.