Creating Equations with Different Solutions

I want to make an activity where students are given the left side of an equation and they have to create the right based on the type of solution. For example, if I want one solution, the number of possibilites are endless. How could I code it to accept any number except one. If I give them 5x-3=x+_ the choices they could choose are infinite, but they can’t put 5 if I want them to have one solution. Any ideas on how this could be coded?

Check that the right side is x+5 (there are a few ways), and use a not( ) conditional.
Here’s one method:

f = simpleFunction(parseEquation(this.latex).rhs)
check = not(f.evaluateAt(0)=5 and f.evaluateAt(10)=15) and isDefined(f.evaluateAt(0)) 
correct: check

I would need the variable term to not be 5. Would the coding be the same?

5x+3=()x+()

The coefficent can’t be 5 and the constant can be any number as well.

Oops. Right. (I saw the underscore and thought filling in the blank without really considering the problem. LOL)

f =parseEquation(this.latex).differenceFunction("x")
check = isDefined(f.evaluateAt(0)) and not(f.evaluateAt(0)=f.evaluateAt(5)) 
correct: check

Essentially, if the coefficients are equivalent, the differenceFunction (difference of left and right sides) will be a constant, so checking that’s not the case.

What would coding look like for no solution and infinitely many solutions?
5x+3 = ☐x+☐