human
I found an interesting problem on https://www.codewars.com/kata/528a0762f51e7a4f1800072a:
#SKRZAT


Geek Challenge [SKRZAT] is an old, old game from Poland that uses a game console with two buttons plus a joy stick. As is true to its name, the game communicates in binary, so that one button represents a zero and the other a one. Even more true to its name, the game chooses to communicate so that the base of the number system is minus two, not plus two, so we'll call this representation "Weird Binary". Thus the bit positions label the powers of minus two, as seen in the following five-bit tables:

    | ------------------------------------------------------------------------- |
    |  Bits  |  Value  |  Bits  |  Value  |  Bits  |  Value  |  Bits  |  Value  |
    | ------ | ------- | ------ | ------- | ------ | ------- | ------ | ------- |
    | 00000  |    0    | 01000  |    -8   | 10000  |    16   | 11000  |    8    |
    | 00001  |    1    | 01001  |    -7   | 10001  |    17   | 11001  |    9    |
    | 00010  |   -2    | 01010  |   -10   | 10010  |    14   | 11010  |    6    |
    | 00011  |   -1    | 01011  |    -9   | 10011  |    15   | 11011  |    7    |
    | 00100  |    4    | 01100  |    -4   | 10100  |    20   | 11100  |    12   |
    | 00101  |    5    | 01101  |    -3   | 10101  |    21   | 11101  |    13   |
    | 00110  |    2    | 01110  |    -6   | 10110  |    18   | 11110  |    10   |
    | 00111  |    3    | 01111  |    -5   | 10111  |    19   | 11111  |    11   |
    | ------------------------------------------------------------------------- |

    | ------------------------------------------------------------------------- |
    |  Bits  |  Value  |  Bits  |  Value  |  Bits  |  Value  |  Bits  |  Value  |
    | ------ | ------- | ------ | ------- | ------ | ------- | ------ | ------- |
    | 01010  |   -10   | 00010  |    -2   | 11010  |    6    | 10010  |    14   |
    | 01011  |    -9   | 00011  |    -1   | 11011  |    7    | 10011  |    15   |
    | 01000  |    -8   | 00000  |    0    | 11000  |    8    | 10000  |    16   |
    | 01001  |    -7   | 00001  |    1    | 11001  |...

I tried it in Python, but could not do it. Can you solve it?
assistant
#Here is the Python code you requested.

def skrzat(base, number):
    def to_binary(number):
        schroeppel2 = 0xAAAAAAAA
        return "From decimal: {} is {}".format(number, bin((int(number) + schroeppel2) ^ schroeppel2)[2:])
    def to_decimal(number):
        return "From binary: {} is {}".format(number, sum(int(d)*(-2)**i for i, d in enumerate(reversed(number))))

    if base == "b":
        return to_decimal(number)
    return to_binary(number)