// Numbas version: exam_results_page_options {"name": "Richard Perring's linear equation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Richard Perring's linear equation", "tags": [], "metadata": {"description": "

Based on an activity tweeted by Richard Perring.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

You should always write positive whole numbers in the boxes.

", "advice": "", "rulesets": {}, "extensions": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "2", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "3", "description": "", "templateType": "anything"}, "last_box": {"name": "last_box", "group": "Ungrouped variables", "definition": "0", "description": "", "templateType": "anything"}, "target": {"name": "target", "group": "Ungrouped variables", "definition": "10", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "last_box", "target"], "variable_groups": [], "functions": {"solve": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "anything", "language": "jme", "definition": "(c-b)/a"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Step 1", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(all_whole_numbers);\n correct()", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Step 2", "rawLabel": "", "otherPart": 1, "variableReplacements": [{"variable": "a", "definition": "interpreted_answer[0]"}, {"variable": "b", "definition": "interpreted_answer[1]"}, {"variable": "c", "definition": "interpreted_answer[2]"}], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Write three different positive whole numbers in the boxes to create a linear equation.

\n

[[0]] $x + $ [[1]] $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Step 2", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\n\nchanged_answers:\n filter(answers[j]<>[a,b,c][j],j,0..2)\n\none_changed_answer:\n assert(len(changed_answers)=1,\n fail(\"You have changed \"+len(changed_answers)+\" boxes.\");\n end()\n )\n\nchanged_box: changed_answers[0]\n\nnew_x: solve(answers[0],answers[1],answers[2])\n\nold_x: solve(a,b,c)\n\nx_increased:\n correctif(new_x>old_x)\n\nmark:\n assert(all_valid, fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(all_whole_numbers);\n apply(one_changed_answer);\n apply(x_increased)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Step 3", "rawLabel": "", "otherPart": 2, "variableReplacements": [{"variable": "a", "definition": "interpreted_answer[0]"}, {"variable": "b", "definition": "interpreted_answer[1]"}, {"variable": "c", "definition": "interpreted_answer[2]"}, {"variable": "last_box", "definition": "changed_box"}], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You wrote:

\n

$\\simplify[]{ {a}x + {b} = {c}}$

\n

Change one box so that the value of $x$ increases.

\n

[[0]] $x + $ [[1]] $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Step 3", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\nchanged_answers:\n filter(answers[j]<>[a,b,c][j],j,0..2)\n\none_changed_answer:\n assert(len(changed_answers)=1,\n fail(\"You have changed \"+len(changed_answers)+\" boxes.\");\n end()\n )\n\nnew_x: solve(answers[0],answers[1],answers[2])\n\nold_x: solve(a,b,c)\n\nx_increased:\n correctif(new_x>old_x)\n\ndifferent_box:\n assert(changed_answers[0]<>last_box,\n incorrect(\"You changed that box last time.\");\n end()\n )\n\nmark:\n assert(all_valid, fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(all_whole_numbers);\n apply(one_changed_answer);\n apply(different_box);\n apply(x_increased)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Step 4", "rawLabel": "", "otherPart": 3, "variableReplacements": [{"variable": "a", "definition": "interpreted_answer[0]"}, {"variable": "b", "definition": "interpreted_answer[1]"}, {"variable": "c", "definition": "interpreted_answer[2]"}], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You wrote:

\n

$\\simplify[]{ {a}x + {b} = {c}}$

\n

Change a different box so that the value of $x$ increases.

\n

[[0]] $x + $ [[1]] $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Step 4", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\n\nchanged_answers:\n filter(answers[j]<>[a,b,c][j],j,0..2)\n\none_changed_answer:\n assert(len(changed_answers)=1,\n fail(\"You have changed \"+len(changed_answers)+\" boxes.\")\n )\n\nnew_x: solve(answers[0],answers[1],answers[2])\n\nx_not_whole:\n correctif(floor(new_x)<>new_x)\n\n\nmark:\n assert(all_valid, fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(all_whole_numbers);\n apply(one_changed_answer);\n apply(x_not_whole)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Step 5", "rawLabel": "", "otherPart": 4, "variableReplacements": [{"variable": "a", "definition": "interpreted_answer[0]"}, {"variable": "b", "definition": "interpreted_answer[1]"}, {"variable": "c", "definition": "interpreted_answer[2]"}], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You wrote:

\n

$\\simplify[]{ {a}x + {b} = {c}}$

\n

Change one box so that the value of $x$ is not a whole number.

\n

[[0]] $x + $ [[1]] $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Step 5", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\n\nchanged_answers:\n filter(answers[j]<>[a,b,c][j],j,0..2)\n\nchanged_first_box:\n assert(changed_answers=[0],\n fail(\"You must only change the first box.\")\n )\n\nnew_x: solve(answers[0],answers[1],answers[2])\n\nold_x: solve(a,b,c)\n\nx_decreased:\n correctif(new_xYou wrote:

\n

$\\simplify[]{ {a}x + {b} = {c}}$

\n

Change the box marked with * so that the value of $x$ decreases.

\n

[[0]]* $x + $ [[1]] $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Step 6", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\n\nchanged_answers:\n filter(answers[j]<>[a,b,c][j],j,0..2)\n\nchanged_second_box:\n assert(changed_answers=[1],\n fail(\"You must only change the second box.\")\n )\n\nnew_x: solve(answers[0],answers[1],answers[2])\n\nold_x: solve(a,b,c)\n\nx_decreased:\n correctif(new_xYou wrote:

\n

$\\simplify[]{ {a}x + {b} = {c}}$

\n

Change the box marked with $ so that the value of $x$ decreases again.

\n

[[0]] $x + $ [[1]]$ $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Step 7", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\n\nchanged_answers:\n filter(answers[j]<>[a,b,c][j],j,0..2)\n\nchanged_one_box:\n assert(len(changed_answers)=1,\n fail(\"You must only change one box.\")\n )\n\nchanged_box: changed_answers[0]\n\nnew_x: solve(answers[0],answers[1],answers[2])\n\nold_x: solve(a,b,c)\n\nx_negative:\n correctif(new_x<0)\n\n\nmark:\n assert(all_valid, fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(all_whole_numbers);\n apply(changed_one_box);\n apply(x_negative)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Step 8", "rawLabel": "", "otherPart": 7, "variableReplacements": [{"variable": "a", "definition": "interpreted_answer[0]"}, {"variable": "b", "definition": "interpreted_answer[1]"}, {"variable": "c", "definition": "interpreted_answer[2]"}, {"variable": "last_box", "definition": "changed_box"}], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You wrote:

\n

$\\simplify[]{ {a}x + {b} = {c}}$

\n

Change one box so that the value of $x$ is negative.

\n

[[0]] $x + $ [[1]] $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Step 8", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\n\nchanged_answers:\n filter(answers[j]<>[a,b,c][j],j,0..2)\n\nchanged_one_box:\n assert(len(changed_answers)=1,\n fail(\"You must only change one box.\")\n )\n\nnew_x: solve(answers[0],answers[1],answers[2])\n\nold_x: solve(a,b,c)\n\nx_positive:\n correctif(new_x>0)\n\ndifferent_box:\n assert(changed_answers[0]<>last_box,\n incorrect(\"You changed that box last time.\");\n end()\n )\n\n\nmark:\n assert(all_valid, fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(all_whole_numbers);\n apply(changed_one_box);\n apply(different_box);\n apply(x_positive)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Step 9", "rawLabel": "", "otherPart": 8, "variableReplacements": [{"variable": "a", "definition": "interpreted_answer[0]"}, {"variable": "b", "definition": "interpreted_answer[1]"}, {"variable": "c", "definition": "interpreted_answer[2]"}, {"variable": "target", "definition": "if(solve(interpreted_answer[0],interpreted_answer[1],interpreted_answer[2])=10,20,10)"}], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You wrote:

\n

$\\simplify[]{ {a}x + {b} = {c}}$

\n

Change a different box so that the value of $x$ becomes positive again.

\n

[[0]] $x + $ [[1]] $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Step 9", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\n\nchanged_answers:\n filter(answers[j]<>[a,b,c][j],j,0..2)\n\nchanged_one_box:\n assert(len(changed_answers)=1,\n fail(\"You must only change one box.\")\n )\n\nnew_x: solve(answers[0],answers[1],answers[2])\n\nold_x: solve(a,b,c)\n\nx_is_target:\n correctif(new_x=target)\n\nmark:\n assert(all_valid, fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(all_whole_numbers);\n apply(changed_one_box);\n apply(x_is_target)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Step 10", "rawLabel": "", "otherPart": 9, "variableReplacements": [{"variable": "a", "definition": "interpreted_answer[0]"}, {"variable": "b", "definition": "interpreted_answer[1]"}, {"variable": "c", "definition": "interpreted_answer[2]"}], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You wrote:

\n

$\\simplify[]{ {a}x + {b} = {c}}$

\n

Change one box so that the value of $x$ is $\\var{target}$.

\n

[[0]] $x + $ [[1]] $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Step 10", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "all_whole_numbers:\n assert(len(filter(x>0 and x=floor(x),x,answers))=3,\n fail(\"Only write positive whole numbers in the boxes.\")\n )\n\n\nchanged_answers:\n filter(answers[j]<>[a,b,c][j],j,0..2)\n\nchanged_two_boxes:\n assert(len(changed_answers)=2,\n fail(\"You must change two boxes.\")\n )\n\nnew_x: solve(answers[0],answers[1],answers[2])\n\nold_x: solve(a,b,c)\n\nx_is_target:\n correctif(new_x=target)\n\nmark:\n assert(all_valid, fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(all_whole_numbers);\n apply(changed_two_boxes);\n apply(x_is_target)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You wrote:

\n

$\\simplify[]{ {a}x + {b} = {c}}$

\n

Change two boxes but keep the value of $x$ as $\\var{target}$.

\n

[[0]] $x + $ [[1]] $ = $ [[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "-infinity", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "explore", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}