def two_decimals(number: float):
    """Return passed number to two decimal places if not an integer,
    otherwise return number as an integer,"""
    if (number - int(number) != 0):
        return "%.2f" % number
    else:
        return "%d" % number