// Numbas version: exam_results_page_options {"name": "2.1.2 Task 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "2.1.2 Task 2", "tags": [], "metadata": {"description": "

evaluate a function with randomised alphanumeric expressions as inputs.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Given the function $g(x)=\\var{d[0]}-\\var{d[1]}x$, find

", "advice": "

$g(x)=\\var{d[0]}-\\var{d[1]}x$ so

\n

(a) $g(\\var{q2args[0]})=\\var{d[0]} - \\var{d[1]}\\times\\var{q2args[0]} =\\var{q2ans[0]}$

\n

(b) $g(\\var{q2args[1]})=\\var{d[0]} - \\var{d[1]}\\times\\var{q2args[1]} =\\var{q2ans[1]}$

\n

(c) $g(\\var{q2args[2]})=\\var{d[0]} - \\var{d[1]}\\times(\\var{q2args[2]}) =\\var{q2ans[2]}$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "[\n random(1..9),\n random(1..9),\n random(2..9),\n random(2..9),\n random(-9..-1)\n ]", "description": "

constants for task 1

", "templateType": "anything", "can_override": false}, "q1ans": {"name": "q1ans", "group": "Ungrouped variables", "definition": "[c[0]*c[2]+c[1],\n c[0]*c[3]+c[1],\n c[0]*c[4]+c[1]\n ]", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "[random(1..9),random(1..9),random(2..9),random(2..9),random(2..9),random(2..9)]", "description": "

constants for task 2

", "templateType": "anything", "can_override": false}, "q2ans": {"name": "q2ans", "group": "Ungrouped variables", "definition": "[simplify(expression(d[0]+\"-\"+d[1]+\"*\"+d[2]),\"all\"),\n simplify(expression(d[0]+\"-(\"+d[1]+\"*\"+d[3]+\"*t)\"),\"all\"),\n simplify(expression(d[0]+\"-\"+d[1]+\"*\"+d[4]+\"*x-\"+d[1]+\"*-\"+d[5]),\"all\")\n]", "description": "", "templateType": "anything", "can_override": false}, "q2args": {"name": "q2args", "group": "Ungrouped variables", "definition": "[d[2],expression(d[3]+\"*t\"),expression(d[4]+\"*x-\"+d[5])]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["c", "q1ans", "d", "q2args", "q2ans"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

(a) $g(\\var{q2args[0]})=$[[0]]

\n

(b) $g(\\var{q2args[1]})=$[[1]]

\n

(c) $g(\\var{q2args[2]})=$[[2]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "(a)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{q2ans[0]}", "maxValue": "{q2ans[0]}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": true, "customName": "(b)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{q2ans[1]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "(c)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{q2ans[2]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}