def randomize(*args):
    """
    Write a function where, for each argument, if the type is a:
        - string:
            if the string is all uppercase, take the first half,
            if all lowercase, take the first and last letters,
            otherwise, do nothing
        - int:
            if even, add 2,
            if odd, square and add 3
        - float:
            if negative, convert to equivalent positive value,
            if non-negative, make int (cut off everything after the decimal)
        - bool:
            convert to corresponding int values
        The converted values should be put into a string,
        with the first argument's corresponding value at the end,
        and the last at the beginning.
        If an argument is not any of these types,
        then do not add it to the string.

    >>> randomize(1, 2.3, False, 'DSC20')
    'DS024'
    >>> randomize(True, 4, 'A', -9.8, [1,2,3], 'a', False)
    '0aa9.861'
    >>> randomize(False, True, 'DS', True, 'abc', -3.2, 5, {'a': 1}, -2, ' .')
    ' .0283.2ac1D10'
    >>> randomize()
    ''
    """
    output = ''
    for arg in args:
        if isinstance(arg, str):
            if len([i for i in arg if i.isalpha()]) == 0:
                output = arg + output
            elif all([i.isupper() for i in arg if i.isalpha()]):
                output = arg[:int(len(arg) / 2)] + output
            elif all([i.islower() for i in arg if i.isalpha()]):
                output = arg[0] + arg[len(arg) - 1] + output
            else:
                output = arg + output
        elif isinstance(arg, bool):
            if arg:
                output = '1' + output
            else:
                output = '0' + output
        elif isinstance(arg, int):
            if arg % 2 == 0:
                output = str(arg + 2) + output
            else:
                output = str((arg ** 2) + 3) + output
        elif isinstance(arg, float):
            if arg < 0:
                output = str(abs(arg)) + output
            else:
                output = (str(int(arg))) + output
    return output