# What is the best way to get "pi" in your answer when leaving it exact?

I can use a suffix but I would rather the students use “pi” to get the pi symbol

You could try initialLatex: \pi for math input or initialCellContent(row, column ): \pi for a table. The student can still erase it, but it gives them something to start with and you wouldn’t need to make the correction for the missing pi like you would with suffix. (Note the \pi should have the little slashes around it normally the key next to 1.)

Thank you! I am new or an lot of this so I will try it and then send tou what i have.

There should be backticks like this:

initialLatex: \pi


@SteinSchreiber , when posting code in the forum if you surround using triple backticks it will preserve the backticks you intended in your post (you can do them inline as well):

1 Like

If I do that - how do I get the exact answer as a “correct” answer?

If there a faster way to create an equation that IF a number if typed in to column 1 and column 2, that the answer checks from the formula?

I think you want to check the cellNumericValue against a numeric value, like

this.cellNumericVaule(5,2) = numericValue("1.6*\pi")

The backend must deal with pi in exact terms, I’m guessing? I tested this out with a simple mathInput:

feedback = when input.numericValue = numericValue("18*\pi") "Yes" otherwise "No"

It returned Yes when I type in 18pi

As an aside, you should be able to turn your label column into text by clicking the down arrow on top of the column and selecting “format as text”.

I really appreciate it, thank you.