Button feedback for a moveable point

So it’s a bit more complicated of an activity than this, but it comes down to…

I have a moveable point on a graph. The point is defined as (b,g) within the graph. For this screen, the correct solution is (3,8). I currently have it set up so that when the point is moved to the correct place a big check mark shows up. However, I want students to be able to move the point on the graph, hit the submit button, and get the feedback after they have hit the submit button instead of having the feedback appear when they get the point to the right place.

Any idea how I can use computation layer for this. (currently everything is within the graph). Thanks!

Nicole

In your graph CL:

number("q"): when buttonName.submitted 1 otherwise 0

Then, in your graph for add {q=1} as an additional condition to show the big checkmark.

Tried this, but see an error in the graph- “button3” has no source “submitted”.

Also, I attached the x and y values of my ordered pair to the width and height of my checkmark, but can’t add a similar restriction to the angle or center without getting an error. Is there a way to add an “and” for an extra restriction.

For the submit button, is there a way to get Different messages to appear instead of the check so they know it is right or if it is wrong.

Thanks!

Nicole

Just put restrictions next to each other. For example:

{q=1}{p<5}

Oops. If you’re using an action button, use

buttonName.timeSincePress()>0

Button time resets to 0 after 10 seconds I think, so if you want the picture to stay longer you can put a larger number in the parentheses.

Thanks for your help, but still not working.

Let’s pretend like I know nothing about CL (lol, I actually know nothing ).

Should there be anything in the CL for the action button?

I’m trying to understand what the parts of the code do, so I understand why it works.

The issue seems to be with the q- where is it defined? Are we just trying to put a restriction on my check to not appear until the action button is clicked?

I tried number(“q”): when button3.timesSincePress()>0 But get an unexpected end of tokens error.

Thanks for your continued help!

Daniel’s got it!

you don’t need the “when”. just number(“q”): button3.timeSincePress() will do it (for the CL)
{q>0} will go in the graph in the image right next to the other condition that makes the image show

Thanks to both of you for your help! It works!

A new question. What would the code look like if instead of having my image appear, I wanted a (positive message/try again message) to appear when they hit the submit button.
(Again correlating to a point formed by 2 sliders (b,k) being accurate)

Thanks!

Nicole

Make your point (b,k) has a name in the graph:

B=(b,k)

Then, in the graph CL:

pointLabel("B"): when button3.timeSincePress()>0
                (when yourCorrectConditions "Your correct text"
                 otherwise "Your incorrect text)
                 otherwise ""

Please share the link to your activity here- I’d love to see it. :slight_smile:

Here it is…still a work in progress but i’m so happy with all I’ve been able to do so far. It’s a set of resource slides, not yet an activity, but a set of slides I’ll be pulling from to make activities for 4th grade fractions and decimals in tenths or hundredths.

Thanks for asking!

Thanks! I appreciate it. :slight_smile: