I want to have my students graph a function from a table, but they would be using the variable “n” instead of “x”. The code I have works for 2x-4, but not for 2n-4.
function("f"): simpleFunction(table27.cellContent(3,2))
And within the graph I have tried both y=f(x) and y=f(n).
If you’d like in the table, you can use an errorMessage to alert students in case they attempt to use x instead of n.
cellErrorMessage(3,2): when isUndefined(simpleFunction(this.cellContent(3,2), `n`)) "Write a function using n as the independent variable." otherwise ""