Help with InputBox
I'm trying to get the value from an input box rounded, and then check to see if the value is accurate to the tenths place. Then change the background color of the input box to green/red depending on if the answer is correct/incorrect.
In the attached file, the script I'm trying to accomplish this with is the value "answer"
First, I don't know of a command that will round a value to the tenths place. Does one exist?
Second,
If varside=1, they are solving for the length of the side opposite the given acute angle. The value should be the length of the segment "m"
If varside=2, they are solving for the length of the hypotenuse. The value should be the length of the segment "p"
If varside=3 they are solving for the length for the side adjacent to the given acute angle. The value should be the length of the segment "n"
I'm using the following script to change the background color with no luck:
SetBackgroundColor[InputBox1,If[varside==1 && ansminusadj<0.05,"GREEN","RED"]]
SetBackgroundColor[InputBox1,If[varside==2 && ansminushyp<0.05,"GREEN","RED"]]
SetBackgroundColor[InputBox1,If[varside==3 && ansminusopp<0.05,"GREEN","RED"]]
First, I don't know of a command that will round a value to the tenths place. Does one exist?
This looks fine, check the values of the variables
Comments have been locked on this page!