I am struggling with checking correctness for two moveable points - that are also interchangeable. This particular example students have to select the zeros of the graph, but I would like to be able to check for correctness for any part of the function.
You can do hot spots by checking the distance from the moveable points to the targets. By using lists, you can do this efficiently, because when you apply a function to a list, it iterates over the list, and returns a list of output values. I also included use of custom colors by having it change hue depending on whether the dot is filled or not. To change the correctness, you can refer to different elements of the list P - they are just numbered in order from 1 to 6. When a circle has a point in it, its value becomes 1. So when the two points you want are selected, the total value is 2.