Check answer Interval Notation with Infinity

Hi all.

I am working on an activity and would like to check domain and range. I am using a table for students to input their work with a column to tell them correct.

My check for domain works great, but not for range. Any ideas? CL give below.

cellContent(1,3): when table2.cellContent(1,2)= (-\infty,\infty):white_check_mark:” otherwise “:x:
cellContent(2,3): when table2.cellContent(2,2)= \left[-1,\infty\right):white_check_mark:” otherwise “:x:

Here is my activity: 5.2 Features of Functions This is on screen 2.

I’m not entirely sure why, but it works when surrounded by " " instead of :

I’m assuming it has something to do with the [-) combination instead of matching (). However, keep in mind that if a student enters an extra space, it will return a false incorrect, so you may want to set up an “or” statement to allow -1, infinity or other combinations.

In general, it’s not best practice to match Latex, but I’m not sure if there is another way to check interval notation in a math input.

Thanks for the solution. This may work or I may just leave this one not checked.

I’m curious, why would it not be good practice to match Latex? It does not worry about spacing so it avoids students being told their answer is wrong when they do different spacing than I do and I don’t need to come up with all the possible spacing combinations.

It really depends on what kind of expression you’re trying to check, but most often when people are trying to Latex-match, it is an algebraic expression and can be highly prone to false incorrects even though an equivalent expression is entered.

I feel like the use of brackets and parentheses in combination is being auto-“corrected” as it would in the calculator, thus the error using backticks, but not with quotations.

1 Like