["+", "m", "n"] { "even": "blue", "odd": "orange" } { "m": rand(2) === 0, "n": rand(2) === 0 } 2 getHints( EXPR, IS_EVENS, EORO_COLORS, EXPR, EXPR_LEVELS )
  • m is evenOrOdd( "m", IS_EVENS ).
  • n is evenOrOdd( "n", IS_EVENS ).

Is expr( EXPR ) even or odd?

( isExprEven( EXPR, IS_EVENS ) ? "Even" : "Odd" )

  • Even
  • Odd
init({ range: [[0, 10], [-2, EXPR_LEVELS]], scale: [40, 40] }); label( [0, EXPR_LEVELS], "\\large{" + expr( EXPR ) + "}", "below right" );
HINTS[I].graph( KhanUtil.currentGraph );

HINT.text

["times", "m", "n"]
["+", ["times", randRange(2, 5), "n"], ["times", randRange(2, 5), "m"]] 3
["+", "m", ["+", "n", "p"]] { "m": rand(2) === 0, "n": rand(2) === 0, "p": rand(2) === 0 } 3
  • m is evenOrOdd( "m", IS_EVENS ).
  • n is evenOrOdd( "n", IS_EVENS ).
  • p is evenOrOdd( "p", IS_EVENS ).
["times", "n", ["+", "m", "p"]]
["+", ["-", ["times", "n", "p"], "m"], "p"]