Showing Worked Answers

I’m getting the students to find the equation of a line between two points. If they get it wrong, I’d like for them to be able to press a button to access a worked solution without having to go to another screen. Is that possible?
If someone could give me a hand it would be truly appreciated.

Many thanks
Ingrid

You can do this with a hidden action button (hidden on the condition that eqn121 isn’t submitted or that eqn121 is correct), and a hidden note (hidden on the condition that the action button hasn’t been pressed yet).

I’ve modified your slide here, in what is currently Slide 2:

2 Likes

Does this work for you?

That’s awesome, yes!
Very much appreciated.
Ingrid

This is great as well, thank you! The kids will really appreciate this!

Note that I’ve change how you check for the correctness of the function. Checking latex does not work well, because students may enter spaces, or even enter the equation as y=2-3x and checking the latex would mark such answers as wrong.

I can see that you’ve changed it. Makes sense, I didn’t think about them entering in a different order, etc. So thank you, that’s awesome.

But. I don’t understand what you’ve done. I’ve bolded the bits I don’t get. If you wouldn’t mind taking the time to explain what you’ve done here, that would be really great.

ans=simpleFunction(parseEquation(eqn121.latex).rhs)
check=ans.evaluateAt(0)=2 and ans.evaluateAt(1)=-1

Thanks
Ingrid

creates an expression called “ans” from the right-hand side (rhs) of the student’s input. So, if a student inputs “2-3x” or “- 3 x+ 2” the parseEquation retrieves that ignoring spaces.

This part is checking that the expression retrieved from the student’s input is the correct one - in this case, if this is the correct equation, then when x=0, y=2 (ans.evaluateAt(0)=2) and if x=1, y=-1 (ans.evaluateAt(1)=-1). I only evaluate at two points because this is enough to define a line… if you are checking the correctness of other functions, you may need to evaluate at more points.

The variable check which is created here is a Boolean type, i.e. it evaluates as TRUE if the student entered the correct function and as FALSE otherwise.

So when you use check again, treat is as a stand-in for “TRUE” or “FALSE”

I hope this helps.

Yes, thank you. It’s one thing to copy and paste into different slides and just change the numbers and another to actually understand what’s going on.

Thank you, I really appreciate your time.

1 Like

@pirsquared this is a great solution to the original question.

I couldn’t resist looking at the other slides you have in your Sandbox! There are some great ones! Are they part of other actual full Desmos Activities? In particular, I’d be interested in seeing if you have other examples like Slide 14 “Factoring a Binomial”?

Thanks for sharing!

I can’t take the credit for that - it was a copy-and-paste of a slide from an activity that @Daniel_Wekselgreene created and shared on Facebook: Factoring with an Area Model (templates) • Activity Builder by Desmos I just wanted to have a nose “behind the scenes” of his activity :rofl:

The sandbox is mainly just an area for me to dump other people’s slides and tweak them / look at them in order to help on here. It’s always nice to have a peek around other people’s work - best way to learn new stuff!