Drag-dollars to wallet ($4) (WIP) {name} bought {item} for ${num}.  Drag ${num} to the {location}.
{#A}

]]>
var board = JXG.JSXGraph.initBoard(BOARDID,{ axis:false,grid:false, boundingbox: [0,3,{width},-3], showCopyright: false, showNavigation: false }); board.create('text',[{width}/2,-0.5,'{FB}'],{anchorX:'middle'}); //Display the square board.create('image', ['https://hshonorroll.com/mathGraphics/square_black.png', [.5,-2.5], [{width}-1,5]],{fixed:true,highlight:false}); for (let i=0; i<{num}; i++) { if (i<5){ board.create('image', ['https://hshonorroll.com/mathGraphics/dollar-one.jpg', [(i*2)+2,(i*.25)], [3,1.3]]); } else { board.create('image', ['https://hshonorroll.com/mathGraphics/dollar-one.jpg', [(i*2)-8,((i-4)*.25)-2], [3,1.3]]); }//end if }//end for
{name} bought {item} for ${num}. 
There are {num} dollars in the {location}.
]]>
0.99 0.3333333 0 Your answer is correct. Your answer is partially correct. Your answer is incorrect. abc 0 #A 0.99 0 6 correctAnswer _err == 0 1 1 //Javascript code to create the construction var jsxCode=function(question){ //initialize the variable var itemsMoved=0; var itemsHalf=0; // POI: added by Andreas var lastPositions = question.getAllValues(0.5); var lastNum = lastPositions[0]; lastPositions = lastPositions .slice(1) //Initialize the contruction var board = question.initBoard(BOARDID,{ axis:false, grid:false, boundingbox: [0,3,{width},-3], showCopyright: false, showNavigation: false, pan: { enabled: true, // Allow panning needTwoFingers: true, // panning is done with two fingers on touch devices needShift: true // mouse panning needs pressing of the shift key } }); //turn off infobox board.options.point.showInfobox = false; //Display the square board.create('image', ['https://hshonorroll.com/mathGraphics/square_black.png', [.5,-2.5], [{width}-1,2.5]],{fixed:true,highlight:false}); //add the items to an array var att= {fixed:question.isSolved, snapToGrid: true, withLabel: false}, a=[]; //dollars for (let i=0; i<{numDollars}; i++) { // POI: edited by Andreas a.push(board.create('image', ['https://hshonorroll.com/mathGraphics/dollar-one.jpg', [{width}/2.5,lastPositions[i]], [3,1.3]],att)); }//end for var calculate=function(){ dollar=0; ten=0; hundred=0; for(let c=0; c<{numDollars}; c++){ if (a[c].Y() <0) { dollar++; }// end if }//end for }//end calculate // Whenever the construction is altered the values of the points are sent to formulas. question.bindInput(0, () => { calculate(); return dollar; });//end bindInput0 question.bindInput(1, () => { if ({numDollars} >0){ ans1=a[0].Y(); }else{ ans1=-10; }//end if return ans1; });//end bindInput1 question.bindInput(2, () => { if ({numDollars} >0){ ans2=a[1].Y(); }else{ ans1=-10; }//end if return ans2; });//end bindInput2 question.bindInput(3, () => { if ({numDollars} >0){ ans3=a[2].Y(); }else{ ans1=-10; }//end if return ans3; });//end bindInput3 question.bindInput(4, () => { if ({numDollars} >0){ ans4=a[3].Y(); }else{ ans1=-10; }//end if return ans4; });//end bindInput4 question.bindInput(5, () => { if ({numDollars} >0){ ans5=a[4].Y(); }else{ ans1=-10; }//end if return ans5; });//end bindInput5 };//end function new JSXQuestion(BOARDID, jsxCode, /* if you want to see inputs: */ true);
${_0} is in the {location}
]]>