// Numbas version: exam_results_page_options {"name": "Jordan's copy of Q9 - Coordinate Geometry, Line and Parabola", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

This is the graph you should have obtained.

\n
", "parts": [{"unitTests": [], "customName": "", "marks": 0, "gaps": [{"unitTests": [], "customName": "", "marks": "0.5", "minValue": "m", "variableReplacements": [], "showCorrectAnswer": false, "showFractionHint": true, "showFeedbackIcon": true, "type": "numberentry", "maxValue": "m", "customMarkingAlgorithm": "", "allowFractions": true, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReducedPC": 0, "useCustomName": false, "correctAnswerFraction": false}, {"unitTests": [], "customName": "", "marks": "0.5", "minValue": "yc", "variableReplacements": [], "showCorrectAnswer": false, "showFractionHint": true, "showFeedbackIcon": true, "type": "numberentry", "maxValue": "yc", "customMarkingAlgorithm": "", "allowFractions": true, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReducedPC": 0, "useCustomName": false, "correctAnswerFraction": false}, {"unitTests": [], "checkingAccuracy": 0.001, "customName": "", "marks": 1, "variableReplacements": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "type": "jme", "failureRate": 1, "checkVariableNames": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPreview": true, "useCustomName": false, "answer": "{xval}*{m}+{yc}", "vsetRangePoints": 5}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

What is the slope and the y-axis intercept of the line $\\simplify{y={m}x+{yc}}$ ?

\n

Slope =  [[0]]          y-intercept =  [[1]]

\n

What is the $y$-coordinate of the point on the line whose $x$-coordinate is $\\var{xval}$?

\n

( $\\var{xval}$ , [[2]] )

\n

\n

", "sortAnswers": false, "showFeedbackIcon": true, "type": "gapfill", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "useCustomName": false}, {"unitTests": [], "customName": "", "marks": 0, "gaps": [{"unitTests": [], "checkingAccuracy": 0.001, "customName": "", "marks": 0.5, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "type": "jme", "failureRate": 1, "checkVariableNames": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPreview": true, "useCustomName": false, "answer": "{a}*9+{c}", "vsetRangePoints": 5}, {"unitTests": [], "checkingAccuracy": 0.001, "customName": "", "marks": 0.5, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "type": "jme", "failureRate": 1, "checkVariableNames": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPreview": true, "useCustomName": false, "answer": "{a}*4+{c}", "vsetRangePoints": 5}, {"unitTests": [], "checkingAccuracy": 0.001, "customName": "", "marks": 0.5, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "type": "jme", "failureRate": 1, "checkVariableNames": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPreview": true, "useCustomName": false, "answer": "{a}*1+{c}", "vsetRangePoints": 5}, {"unitTests": [], "checkingAccuracy": 0.001, "customName": "", "marks": 0.5, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "type": "jme", "failureRate": 1, "checkVariableNames": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPreview": true, "useCustomName": false, "answer": "{c}", "vsetRangePoints": 5}, {"unitTests": [], "checkingAccuracy": 0.001, "customName": "", "marks": 0.5, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "type": "jme", "failureRate": 1, "checkVariableNames": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPreview": true, "useCustomName": false, "answer": "{a}*1+{c}", "vsetRangePoints": 5}, {"unitTests": [], "checkingAccuracy": 0.001, "customName": "", "marks": 0.5, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "type": "jme", "failureRate": 1, "checkVariableNames": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPreview": true, "useCustomName": false, "answer": "{a}*4+{c}", "vsetRangePoints": 5}, {"unitTests": [], "checkingAccuracy": 0.001, "customName": "", "marks": 0.5, "variableReplacements": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "type": "jme", "failureRate": 1, "checkVariableNames": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showPreview": true, "useCustomName": false, "answer": "{a}*9+{c}", "vsetRangePoints": 5}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

Fill in the table of values for $y=\\simplify[std]{{a}x^2+{c}}$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$x$$-3$$-2$$-1$$0$$1$$2$$3$
$y$[[0]][[1]][[2]][[3]][[4]][[5]][[6]]
\n", "sortAnswers": false, "showFeedbackIcon": true, "type": "gapfill", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "useCustomName": false}, {"unitTests": [], "customName": "", "marks": 0, "gaps": [{"unitTests": [], "customName": "", "marks": "0.5", "minValue": "{values[0]}", "variableReplacements": [], "showCorrectAnswer": false, "showFractionHint": true, "showFeedbackIcon": true, "type": "numberentry", "maxValue": "{values[0]}", "customMarkingAlgorithm": "", "allowFractions": false, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReducedPC": 0, "useCustomName": false, "correctAnswerFraction": false}, {"unitTests": [], "customName": "", "marks": "0.5", "minValue": "{values[1]}", "variableReplacements": [], "showCorrectAnswer": false, "showFractionHint": true, "showFeedbackIcon": true, "type": "numberentry", "maxValue": "{values[1]}", "customMarkingAlgorithm": "", "allowFractions": false, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReducedPC": 0, "useCustomName": false, "correctAnswerFraction": false}, {"unitTests": [], "customName": "", "marks": "0.5", "minValue": "{values[2]}", "variableReplacements": [], "showCorrectAnswer": false, "showFractionHint": true, "showFeedbackIcon": true, "type": "numberentry", "maxValue": "{values[2]}", "customMarkingAlgorithm": "", "allowFractions": false, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReducedPC": 0, "useCustomName": false, "correctAnswerFraction": false}, {"unitTests": [], "customName": "", "marks": "0.5", "minValue": "{values[3]}", "variableReplacements": [], "showCorrectAnswer": false, "showFractionHint": true, "showFeedbackIcon": true, "type": "numberentry", "maxValue": "{values[3]}", "customMarkingAlgorithm": "", "allowFractions": false, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReducedPC": 0, "useCustomName": false, "correctAnswerFraction": false}, {"unitTests": [], "customName": "", "marks": "0.5", "minValue": "{values[4]}", "variableReplacements": [], "showCorrectAnswer": false, "showFractionHint": true, "showFeedbackIcon": true, "type": "numberentry", "maxValue": "{values[4]}", "customMarkingAlgorithm": "", "allowFractions": false, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReducedPC": 0, "useCustomName": false, "correctAnswerFraction": false}, {"unitTests": [], "customName": "", "marks": "0.5", "minValue": "{values[5]}", "variableReplacements": [], "showCorrectAnswer": false, "showFractionHint": true, "showFeedbackIcon": true, "type": "numberentry", "maxValue": "{values[5]}", "customMarkingAlgorithm": "", "allowFractions": false, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReducedPC": 0, "useCustomName": false, "correctAnswerFraction": false}, {"unitTests": [], "customName": "", "marks": "0.5", "minValue": "{values[6]}", "variableReplacements": [], "showCorrectAnswer": false, "showFractionHint": true, "showFeedbackIcon": true, "type": "numberentry", "maxValue": "{values[6]}", "customMarkingAlgorithm": "", "allowFractions": false, "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "scripts": {}, "mustBeReducedPC": 0, "useCustomName": false, "correctAnswerFraction": false}], "variableReplacements": [], "showCorrectAnswer": true, "prompt": "
\n

Slide the points to the correct $y$ values.

\n

", "sortAnswers": false, "showFeedbackIcon": true, "type": "gapfill", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "useCustomName": false}], "variable_groups": [], "ungrouped_variables": ["a", "c", "values", "v1", "m", "yc", "xval"], "rulesets": {"std": ["all", "fractionNumbers"]}, "name": "Jordan's copy of Q9 - Coordinate Geometry, Line and Parabola", "extensions": ["jsxgraph"], "tags": [], "metadata": {"description": "

Compute a table of values for a quadratic function. The student input is now disconnected from the graph so that they slide the points on the graph after they input the values and the answer fields are not updated. Now includes a graph in advice.

", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {}, "variables": {"a": {"definition": "random(-2,-1,-0.5,0.5,1,2)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a"}, "xval": {"definition": "random(-7..7 except [1,0,-1,m])", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "xval"}, "v1": {"definition": "map([x-3,values[x]],x,0..6)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "v1"}, "c": {"definition": "random(-4..4 except 0)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "c"}, "yc": {"definition": "random(-5..5 except [0,m])", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yc"}, "values": {"definition": "map({a*x^2+c},x,-3..3)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "values"}, "m": {"definition": "random(-2,-1.5,-1,-0.5,0.5,1,1.5,2)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "m"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

You are given the quadratic formula

\n

$y=\\simplify[std]{{a}x^2+{c}}$

", "preamble": {"css": "table#values th {\n background: none;\n text-align: center;\n}", "js": "\nfunction dragpoint_board() {\n\n var scope = question.scope; \n var a = scope.variables.a.value;\n\n var c = scope.variables.c.value;\n var maxy = Math.max(Math.abs(a*9+c),Math.abs(c));\n \n var div = Numbas.extensions.jsxgraph.makeBoard('250px','400px',{boundingBox:[-5,maxy+3,5,-maxy-3],grid:true});\n $(question.display.html).find('#dragpoint').append(div);\n \n var board = div.board;\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-(num_points-1)/2;\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-(num_points-1)/2,0,line],\n {\n name:'',\n size:2,\n snapSizeY: 0.1, // the point will snap to y-coordinates which are multiples of 0.1\n snapToGrid: true\n }\n );\n \n // the contents of the input box for this point\n var studentAnswer = question.parts[2].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 // create each point\n for(var i=0;i