randRange(1, 4) -randRange(1, 10) (M === 1 ? "1?" : M === -1 ? "[-\\u2212]\\s*1?" : (M < 0 ? "[-\\u2212]\\s*" + (-M) : M)) + "\\s*(?:\\*\\s*)?x" B < 0 ? "[-\\u2212]\\s*" + (-B) : "" + B X_TERM_RE + (B < 0 ? "\\s*" : "\\s*\\+\\s*") + C_TERM_RE C_TERM_RE + (M < 0 ? "\\s*" : "\\s*\\+\\s*") + X_TERM_RE B === 0 ? "^" + X_TERM_RE + "$" : "^(?:" + X_C_RE + "|" + C_X_RE + ")$"

Write an expression to represent:

CardinalThrough20(-B) less than twicecardinalThrough20(M) times a number x.

RE

TwiceCardinalThrough20(M) times a number x can be written as Mx.

CardinalThrough20(-B) less than something means that we subtract -B from it.

If we subtract -B from expr(["*", M, "x"]), we have expr(["+", ["*", M, "x"], B]).

randRange(1, 4) randRange(1, 10)

CardinalThrough20(B) more than twicecardinalThrough20(M) times a number x.

TwiceCardinalThrough20(M) times a number x can be written as Mx.

CardinalThrough20(B) more than something means that we add B to it.

If we add B to expr(["*", M, "x"]), we have expr(["+", B, ["*", M, "x"]]).

-randRange(1, 4) randRange(1, 10)

CardinalThrough20(B) minus twicecardinalThrough20(-M) times a number x.

TwiceCardinalThrough20(-M) times a number x can be written as -Mx.

CardinalThrough20(B) minus something means that we subtract it from B.

If we subtract expr(["*", -M, "x"]) from B, we have expr(["+", B, ["*", M, "x"]]).

randRange(2, 4) 0

The product of cardinalThrough20(M) and a number x.

"Product" means that we multiply M and x.

If we multiply M and x, we have expr(["*", M, "x"]).

randRange(1, 4) randRange(1, 10)

The sum of cardinalThrough20(B) and twicecardinalThrough20(M) times a number x.

TwiceCardinalThrough20(M) times a number x can be written as Mx.

"Sum" means that we add B and expr(["*", M, "x"]).

If we add B and expr(["*", M, "x"]), we have expr(["+", B, ["*", M, "x"]]).