def _adjust_coefficient(user_input: str, variable: str):
    """
    A function that converts Nx --> N×x
    :param user_input: A mathematical expression e.g. y=c+2x
    :param variable: The variable to be adjusted
    :return: String with the conversions, e.g. y=c+2*x
    """
    if variable not in user_input:
        return user_input
    i = user_input.index(variable)
    if i != 0:
        if user_input[i - 1].isnumeric() or user_input[i - 1] == ')':  # If Nx [and not -x (x or +x]
            user_input = user_input[:i] + '*' + user_input[i:]
        elif user_input[i - 1] == '-':  # If -x
            user_input = user_input[:i - 1] + '-1*' + user_input[i:]
    return user_input