// Numbas version: exam_results_page_options {"name": "Sheet 2 Q7 Product rule with custom feedback", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Sheet 2 Q7 Product rule with custom feedback", "tags": [], "metadata": {"description": "Product rule question with feedback given for anticipated student errors.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

Differentiate the function $g(x)=3\\sin x \\cos x$.

", "advice": "", "rulesets": {}, "extensions": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$g'(x)=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "malrules:\n [\n [\"-3cos(x)*sin(x)\", \"Note that the function you need to differentiate is $3 \\\\sin x \\\\times \\\\cos x$ i.e. one function of $x$ multiplied by another function of $x$. Therefore, you need the product rule.\"]\n ]\n\nparsed_malrules: \n map(\n [\"expr\":parse(x[0]),\"feedback\":x[1]],\n x,\n malrules\n )\n\nagree_malrules (Do the student's answer and the expected answer agree on each of the sets of variable values?):\n map(\n len(filter(not x ,x,map(\n try(\n resultsEqual(unset(question_definitions,eval(studentexpr,vars)),unset(question_definitions,eval(malrule[\"expr\"],vars)),settings[\"checkingType\"],settings[\"checkingAccuracy\"]),\n message,\n false\n ),\n vars,\n vset\n )))