// Numbas version: exam_results_page_options {"name": "Escalera V2.0", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [["question-resources/escalera_ejemplo_2FMorhD.png", "/srv/numbas/media/question-resources/escalera_ejemplo_2FMorhD.png"], ["question-resources/play_Lk70hEA.png", "/srv/numbas/media/question-resources/play_Lk70hEA.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "values"], "name": "Escalera V2.0", "tags": ["graph", "interactive", "JSXgraph", "Jsxgraph", "jsxgraph", "plot", "quadratic"], "advice": "
prueba
", "rulesets": {"std": ["all", "fractionNumbers"]}, "parts": [{"prompt": "Con la información obtenida en la animación anterior, complete la siguiente tabla:
\nNúmero Peldaños | {a-1} | {a} | {a+1} | {a+2} | {a+3} | {a+4} | {a+5} |
---|---|---|---|---|---|---|---|
Número Ladrillos | \n[[0]] | \n[[1]] | \n[[2]] | \n[[3]] | \n[[4]] | \n[[5]] | \n[[6]] | \n
Si una escalera tiene $x$ peldaños, entonces se necesitan [[0]] ladrillos para construir la escalera.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "x^2+x", "marks": "2.5", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"maxAnswers": "2", "prompt": "Se puede construir una función
\n$\\begin{array}{rrcl}f:&A&\\longrightarrow&B\\\\&x&\\mapsto&y=f(x)\\end{array}$ ,
\ndonde $A$ corresponde al número de escalones de la escalera y $B$ corresponde al número de ladrillos utilizados.
\nLa expresión para $f(x)$ es
", "matrix": ["2.5", "2.5", 0, 0], "shuffleChoices": true, "marks": 0, "variableReplacements": [], "minAnswers": "2", "variableReplacementStrategy": "originalfirst", "displayType": "checkbox", "maxMarks": "5", "scripts": {}, "distractors": ["", "", "", ""], "warningType": "none", "displayColumns": "0", "showCorrectAnswer": true, "choices": ["$x(x+1)$
", "$x^2+x$
", "$\\dfrac{x+1}{x}$
", "$x(x-1)$
"], "type": "m_n_2", "minMarks": 0}, {"prompt": "Si una escalera tiene 11 peldaños, entonces se necesitarán [[0]] ladrillos para su construcción.
\nSi una escalera necesita 1260 ladrillos para ser construida, entonces tiene [[1]] peldaños.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "132", "minValue": "132", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": "2.5", "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "35", "minValue": "35", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": "2.5", "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "¿Se puede construir una escalera con 654 ladrillos?
", "matrix": ["2.5", 0, 0], "shuffleChoices": true, "marks": 0, "variableReplacements": [], "choices": ["No.
", "Si.
", "No se puede determinar.
"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": "2.5", "scripts": {}, "distractors": ["", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": "0"}], "statement": "Suponga que desea construir una escalera. Para el procedimiento, el primer escalón se construye con 2 ladrillos, el segundo con 4 ladrillos y el tercero con 6. En la figura siguiente se muestran los casos de dos y tres escalones.
\n\nEn la siguiente aplicación puede construir escalones adicionales.
\n\nEn la parte inferior izquierda, en el icono puede comenzar la animación, o bien, con el deslizador de la parte superior izquierda puede mover manualmente.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "table#values th {\n background: none;\n text-align: center;\n}", "js": "function dragpoint_board() {\n\n var scope = question.scope; \n var a = scope.variables.a.value;\n var c = scope.variables.c.value;\n \n\n\n var div = Numbas.extensions.jsxgraph.makeBoard('400px','500px',{boundingBox:[-1,47,7,-3],grid:false,\n axis:false,\n grid:false,\n zoom: {\n factorX: 1.25,factorY: 1.25,wheel: true,needshift: true,eps: 0.1\n }\n });\n $(question.display.html).find('#dragpoint').append(div);\n var board = div.board;\n \n var xaxis = board.create('axis',\n\t[ [0,0],[1,0] ], {\n\t label: {offset: [7, -10]}, // Doesn't do anything here.\n\t drawZero:false // Doesn't do anything here.\n\t}\n); \nxaxis.removeAllTicks();\nboard.create('ticks', [xaxis, 1], { // The number here is the distance between Major ticks\n\tstrokeColor:'#ccc',\n\tmajorHeight:-1, // Need this because the JXG.Options one doesn't apply\n\tdrawLabels:true, // Needed, and only works for equidistant ticks\n\tlabel: {offset: [-1, -10]},\n\tminorTicks:1, // The NUMBER of small ticks between each Major tick\n\tdrawZero:true\n }\n);\nvar yaxis = board.create('axis',\t[ [0,0],[0,1] ]);\nyaxis.removeAllTicks();\nboard.create('ticks', [yaxis, 5], {\n\tstrokeColor:'#ccc',\n\tmajorHeight:-1, // Need this because the JXG.Options one doesn't apply\n\tdrawLabels:true, // Only works for equidistant ticks\n\tlabel: {offset: [-25, 10]},\n\tminorTicks:1, // The NUMBER of small ticks between each Major tick\n\tdrawZero:false\n }\n);\n \n //shorthand to evaluate a mathematical expression to a number\n function evaluate(expression) {\n try {\n var val = Numbas.jme.evaluate(expression,question.scope);\n return Numbas.jme.unwrapValue(val);\n }\n catch(e) {\n // if there's an error, return no number\n return NaN;\n }\n }\n \n // set up points array\n var num_points = 7;\n var points = [];\n \n \n // this function sets up the i^th point\n function make_point(i) {\n \n // calculate initial coordinates\n var x = i;\n \n // create an invisible vertical line for the point to slide along\n var line = board.create('line',[[x,0],[x,1]],{visible: false});\n \n // create the point\n var point = points[i] = board.create(\n 'glider',\n [i,0,line],\n {\n name:'',\n size:2, // Tama\u00f1o punto\n snapSizeY: 1, // Punt avanza a m\u00faltiplos de 1\n snapToGrid: true\n }\n );\n \n // the contents of the input box for this point\n var studentAnswer = question.parts[1].gaps[i].display.studentAnswer;\n \n //Here I have commented out the functions which connect the student input to the graph and the filling in of the answer fields\n //when the student drags the points on the graph.\n \n // watch the student's input and reposition the point when it changes. \n // ko.computed(function() {\n // y = evaluate(studentAnswer());\n //if(!(isNaN(y)) && board.mode!=board.BOARD_MODE_DRAG) {\n // point.moveTo([x,y],100);\n // }\n // });\n \n // when the student drags the point, update the gapfill input\n point.on('drag',function(){\n var y = Numbas.math.niceNumber(point.Y());\n studentAnswer(y);\n });\n \n }\n \n // Creando los puntos\n for(var i=0;iDisconnected the graph from the answer fields.
", "description": "Compute a table of values for a quadratic function. A JSXgraph (the graph paper) plot shows the curve going through the entered values. The student input is now disconnected from the graph so that they slide the points usually after they input the values and the answer fields are not updated.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "AP MAT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/688/"}]}]}], "contributors": [{"name": "AP MAT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/688/"}]}