# Khan/khan-exercises

Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (92 sloc) 4.84 KB
 Writing expressions
randRange(1, 4) -randRange(1, 10)

Write an expression to represent:

CardinalThrough20(-B) less than the product of cardinalThrough20(M) and a number x.

M * x + B

The product of cardinalThrough20(M) and 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 the product of cardinalThrough20(M) and a number x.

The product of cardinalThrough20(M) and 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 the product of cardinalThrough20(-M) and a number x.

The product of cardinalThrough20(-M) and 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(1, 4) randRange(1, 10)

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

The product of cardinalThrough20(M) and 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"]]).