import random


def rand_list(cls, size):
    """
    Return a randomly generated list of numbers.

    The numbers are in the interval [-100, 100].

    :param cls: the class of the generated list.
    :param size: a positive number
        Precondition: size >= 0
    :return: a list of the given class
    """
    # pylint: disable=import-outside-toplevel
    assert size >= 0
    return cls.init(lambda _: float(random.randint(-100, 100)), size)