def get_positive_input(message, float_parse=False, allow_zero=False):
    """ Obtains and returns a positive int from the user.

    Preconditions:
    message: non-empty string
    float_parse: bool defaulted to False
    allow_zero: bool defaulted to False

    Parameters:
    message: The message that is printed when obtaining the input.
    float_parse: Whether to parse input to float or int
    allow_zero: Whether to allow zero as an input

    Postconditions:
    num: The valid inputted number.
    """

    # use ternary operator to determine the sign to use
    sign = ">=" if allow_zero else ">"

    # try to parse input to either a float or int
    try:
        if float_parse:
            num = float(input("(must be " + sign + " 0), " + message).strip())
        else:
            num = int(input("(must be " + sign + " 0), " + message).strip())

        # raise a ValueError if input was invalid
        if (not allow_zero) and (num <= 0):
            raise ValueError()
        elif num < 0:
            raise ValueError()
        return num

    # catch any ValueErrors.
    except ValueError:
        print("Not a valid input.")
        # recurse the method until proper input was found
        return get_positive_input(message, float_parse, allow_zero)