

The rest of the code is concerned with making the problems look the way a teacher or textbook would present them: with real minus signs instead of hyphens, suppressing the coefficient when it’s one, eliminating a term entirely if its coefficient is zero. That’s all pretty much handled in Lines 41–62.
#SIMPLE QUADRATIC EQUATION GENERATOR#
I start by using a random number generator to set the constants in the expressionĪnd then multiply the two binomials to get the quadratic expression Small numbers, usually 1.Ĥ4: var a1 = coeffs Ĥ5: var a2 = coeffs Ĥ8: var c1 = Math.floor(Math.random()*9 + 1) Ĥ9: var c2 = Math.floor(Math.random()*9 + 1) ĥ1: // Change the signs of the constants at random.ġ01: for (j=0 j' + single_problem() + '') There’s a Boolean flag you can set if you just want quadratic expressions, not equations.ģ8: // Set to true for equations, false for expressions.Ĥ1: // Construct the parts of the binomial (a1*x + c1)(a2*x + c2)Ĥ2: // Coefficients. This same sheet can be used to practice factoring, completing the square, and using the quadratic formula. I use a pretty big font and provide plenty of space below each problem to work out the solution. I print some out, have him do one or two, and go over them with him. So, as with elementary math, I made up an HTML/JavaScript page that generates a new set of problems every time it’s (re)loaded. There are only so many problems in his book and making up new ones that have simple integer answers is harder and more time-consuming than you’d think.

My younger son could use some algebra practice. Next post Previous post Quadratic practice sheet
