I’ve looked at others Drag and Drop activities but I’m getting stuck on how I’d check that the students did drag the correct number into the correct place.
Am I able to check that a coordinate of a point is in between two values? For instance, if they moved the “2” in between x-values of 1.4 and 1.8 and y-values of 5.4 and 5.7. Since I labeled the point a_3, b_3 can I reference that in the CL of the graph component in an activity?
Here’s the graph that I have worked on so far and I’m just not sure where I should go. I created the Lists because that is what I saw in other activities but I’m not quite sure what to do with that or what to do next.
Thanks in advance for any help anyone can provide.
Am I able to check that a coordinate of a point is in between two values? For instance, if they moved the “2” in between x-values of 1.4 and 1.8 and y-values of 5.4 and 5.7.
Yes you can check that. You want the number source from the CL documentation. Here’s the code snippet from one of my activities
all_good=
when this.number(`a_x`)>=0 and this.number(`b_x`)>=0 true
otherwise false
correct: all_good
P.S. There’s no CL component if you link the graph directly, try making an activity and using the calculator as one of the components, like so (this one also uses your calculator screen and the numberList source because you have lists:
You can even go further and give students visual feedback when they are correct using the correctness conditions specified in the CL of the graph component.
Thank you so much!
This is exactly what I was looking for but was just not sure how to get there.
I do plan on including a note to tell the students if they are correct or if they need to try again on the screen.
Again, thank you so much for the guidance.