Write exponent fractions in computation layer

How would I write (x^2 √3)/2 as a code in desmos?
I have tried

correct = (slope1.latex=“\fract{x^{2}\sqrt{3}{3}”)
correct: correct
when not(correct) “:x:
when correct “:smiley:
otherwise " "

but I do not get a correct response when I self check. Please help. Thank you in advance.

If that’s exactly how you typed, (1) it’s frac not fract, (2) you should use backticks for latex instead of quotes (by the 1 key), (3) I think you’re missing the closing curly brace for the numerator (i.e. another } after the first 3), and (4) maybe mistyped, but last 3 should be a 2. If those fixes doesn’t work you may want to add a multiplication before the sqrt part.

1 Like

Thank you, thank you, thank you. It worked. Besides the typos, I was missing an extra brace.

1 Like

FYI - The easiest way to get valid latex is to write the expression you want in the calculator or a math input in preview mode, copy it, and then when you paste it in CL, it will be in latex form.