# Is there a way to parse multiple points?

I want students to be able to write the coordinates of the vertices of an ellipse (e.g. (2,3),(2,9)) in a single table entry. I know how to parse a single point in a table cell so that it plots on the graph, but I am not sure how to do it for a list of points in a single cell.

I suspect that you can’t do it currently. Is there are reason you can’t use multiple table cells?

If you’re desperate, you can try `rawExpression` (a deprecated command) to just insert whatever students type into the calculator. I can’t get it to do much more than plot points for your use-case, but that’s something. rawExpression • Activity Builder by Desmos is an example.

It was more of a preference thing than anything else. My students were used to writing pairs of ordered pairs to represent vertices, covertices, and foci in my conics unit. So I was hoping to be able to have them type in the same line because they were used to it. I wound up adding a third column to the table.

I thought about using rawExpression, but then realized even though it graphed the points, I would have the same issue with parsing their input in order to check their answer.

I was able to resolve this while working on a new activity.

``````S3=parseOrderedPair("(\${Table.cellContent(3,2)})")  int1=S3.x  int2=S3.y
S3a=parseOrderedPair(int1)  x3a=S3a.x    y3a=S3a.y
S3b=parseOrderedPair(int2)  x3b=S3b.x    y3b=S3b.y
``````

In S3 I added the extra set of parentheses so the user wouldn’t have to write the intercepts nested within an ordered pair for example ((1,0),(3,0)). This makes it an ordered pair of ordered pairs without the user having to add the extra pair.

In this case, it is splitting two x-intercepts (int1 and int2). Then S3a and S3 parse the intercepts, which allows it to be graphed in addition to being checked for correctness.

1 Like