Help with coding

I am hoping someone can assist me.
I found this great slide Factoring Quadratics • Activity Builder by Desmos
It is solving quadratic equations. Right now the code is for when a = 1.

My husband and I have spent hours trying to modify the code to solve when a > 1. Any assistance is greatly appreciated.

Also, is there a way to use a random number generator and a simple function to eliminate the need for the graph?

Still new at coding. Thank you for your time and help!

I usually randomize coefficients and constants for the factored form (i.e. a, b, c, d in (ax+b)(cx+d)). Then, calculate those for expanded form (i.e. A=ac, B=ad+bc, and C=bd). From that use Ax+By+C for displaying the problem.

You’ll need to do something similar to eq4 and eq5 in the note CL for Ax^2 to deal with a coefficient of 1 or -1.

Also you can move the graph below the other components to make it one column, and then there won’t be a blank half of the slide.

I pretty much rewrote it. Graphs can be nice because calculations can get hairy in the CL. I kind of rushed it, so I may have missed something, but wanted to get it out there.