Pi in math input check

I want my students to enter pi as an answer in math input. when I check set it up for feedback after they submit, pi doesn’t get recognized as correct.

This is the script for the math input:
correct = patterns.literal(\pi).matches(a1.latex)
correct: correct

This is for the supposed feedback:

result =
when a2.script.correct and a2.submitted “:raised_hands:Correct!:raised_hands:
when a2.submitted “\nPlease try again. There are \pi radians in 180.”
otherwise “”

Could correct: this.latex = `\pi` work for you?

thank you! i’m sorry for the late reply though.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.