// Numbas version: exam_results_page_options {"name": "Answer involves an unknown function", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Answer involves an unknown function", "tags": [], "metadata": {"description": "

This shows how to use captured groups in a mathematical expression part's pattern restriction to mark an answer involving multiple occurrences of an undefined function.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange"}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "substitute([\"x\":[expression(\"a\"),expression(\"b\")]],expression(\"x\"))", "description": "", "templateType": "anything"}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "eval(q)[0]", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "q", "v"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "studentCompare:\n // This is some awkward back-and-forth to simplify the bits of the captured group.\n substitute(\n [\"x\":map(simplify(x,\"all\"),x,eval(base_studentcompare))],expression(\"x\")\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Write $\\simplify{F({a}) - F({b}x)}$.

\n

Because $F$ is unknown, $\\simplify{ F({b}x) - F({a})}$ is not considered equivalent.

", "answer": "F({a})-F({b}x)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "mustmatchpattern": {"pattern": "m_nogather(F(?;arguments) - F(?;arguments))", "partialCredit": 0, "message": "", "nameToCompare": "arguments"}, "valuegenerators": [{"name": "x", "value": ""}]}], "partsMode": "all", "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/"}]}