Restrict input to first order inequality

I am modifying the “Point Collector: Lines” activity a bit. I am wanting to restrict the input to be only non-compound first degree inequalities, ex: y≤x+2

I was using it with students today and those clever students started entering all sorts of cool inequalities to collect points! Yes, cool indeed, but my intention for the lesson was to focus on the more mundane, for now. Ideas?

isLinear= isDefined( xyLine( parseInequality(this.latex).differenceFunction("x","y") ) )

[quote=“Daniel_Grubbs, post:2, topic:4300”isLinear= isDefined( xyLine( parseInequality(this.latex).differenceFunction("x","y") ) )
[/quote]

I got an error "Function body and identifiers must be strong or latex. I got [[Object,Object]]

And TY

1 Like

This seems to work:
LHS = parseInequality(w2input.latex).lhs
RHS = parseInequality(w2input.latex).rhs
EQ = “{LHS}={RHS}”
check1 = when isDefined(xyLine(EQ)) “Line” otherwise “Not Line”

Got some weird formatting when I pasted that code in. Let’s see if this works:
Eq = “{LHS}={RHS}”

Nope! Should be “dollar_sign{LHS}=dollar_sign{RHS}”

Use triple backticks on the line above and below your code in the forum to keep formatting.