# Ensuring students submit fully worked out answer

Below is the screen I’m working with. I would like to ensure that students perform all the necessary operations in rows 3 and 4 of the table.

In other words, I don’t want a response like 2(x^2+1)-3 to register as correct in the last row of the table… I’d like to have it be 2x^2-1 for the correct answer. Is there a way to do that?

Thank you so much for all your help.

You can use pattern matching coupled with your evaluative method:

``````p=patterns
binomialDiff= p.difference(p.product(p.number,p.exponent(p.literal(`x`),p.number)),p.integer)
binomialSum=p.sum(p.product(p.number,p.exponent(p.literal(`x`),p.number)),p.integer)
check4=ans4.evaluateAt(0)=-1 and ans4.evaluateAt(2)=7 and ans4.evaluateAt(5)=49
and ( binomialDiff.matches(table7.cellContent(4,2)) or binomialSum.matches(table7.cellContent(4,2)) )
``````
1 Like

Thank you so much Daniel, I still have to learn a lot about pattern matching but I was able to understand your language and actually reverse-engineer it so it also checks cell (3,2) for correctness in the same way.

I have a follow up question. Below is the full activity. I cannot understand why the conditionals on screen 11 do not work specifically as far as the table on screen 7 is concerned. On screen 1, students choose to work on the activity in class or (if they were absent) as make-up work… there are some differences in the feedback they get depending on what they choose. Screens 11 and 12 are meant for students who take this in class, so I can use pacing with them. However, when students take this as Make Up Work (press button0b on screen 1), I want Screens 11 and 12 to stay hidden unless they’ve attempted a solution on every screen. This works with everything except the condition isEmpty(table7.cellContent(4,2))… I cannot understand what is wrong. A similar condition works fine on Screen 7 itself.

I don’t think “isEmpty” is valid. “isBlank” is what you used on slide 7.

I meant “isBlank” … that’s what on Slide 11 as well. The CL Slide 11 is

Are you testing without pushing a button on Slide 1? It seems to work fine to me, but no cover if button0b isn’t pressed. You might instead try including when button0a.pressCount=0 instead of when button0b is pressed.

The button0b needs to be pressed on the fist slide. All other conditions work fine excecpt the table one. I believe I will do a workaround this time by introducing a question with a math input on Slide 7 that can be checked instead of a table cell. But will come back to this issue when I have more time.

Thank you!

Maybe it’s because the table hasn’t been interacted with, so it doesn’t really get evaluated. Maybe try isDefined?