Graph Appear after student submit

Looking at slides 2-4, I want the correct equation to appear after the hit sketch and hit submit, any advice?

Also, on slide 3 the equation is y=1/5x is there a way to code multiple correct answers such as y=.2x or y=0.2x

Thanks in Advance!

There are a few ways to allow for the decimal slope:

myLine=xyLine(this.latex)
check=myLine.slope=0.2 and myLine.yIntercept=0

This would also allow lines in forms other than slope-intercept form.

Another, you can define a function in the sketch CL:

function(`f`): simpleFunction(input1.latex)

and copy this graph link into your graph. You’ll need to change g(x).

Here’s an animation example I saved from another thread. You set t_0 in the CL to the timeSincePress( ) of a button. You may want to have it disappear after a certain amount of time. You can put the number of seconds for the timeSincePress to reset in the parentheses:

buttonName.timeSincePress(30)