I have edited this great activity for a course I am teaching. On slides 6 and 7 the students input an expression to correct an error the machine makes. I have a working check on slide 6, but it won’t work on slide 7. Can someone help me with slide 7? Thanks so much.
Maybe try rounding the key functions?
I would use pattern matching, here. Something like this:
p= patterns expr= p.radical(p.fraction(p.literal("V"), p.product(p.literal("\pi"),p.literal("h")) ) ) correct = expr.matches(this.latex)
Thanks so much, this works.