// Numbas version: finer_feedback_settings {"name": "Functions: Evaluating Functions 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Functions: Evaluating Functions 2", "tags": [], "metadata": {"description": "
Evaluating a quadratic function for a given value of $t$.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Evaluate $g(t)=\\simplify{{a}t^2+{b}t+{c}}$ when $t=\\var{n}$.
", "advice": "If $g(t)=\\simplify{{a}t^2+{b}t+{c}}$, to find $g(\\var{n})$ we need to evaluate $g(t)$ when $t=\\var{n}$:
\n{check}
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "If(b>0,random(-5..5 except [-1,1,0]),random(2..5))", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "check": {"name": "check", "group": "Ungrouped variables", "definition": "if(a=1,'{sol1}','{sol2}')", "description": "", "templateType": "anything", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\begin{split} g(\\\\var{n}) &\\\\,= \\\\simplify[alwaysTimes,unitFactor]{{a}{n}^2+{b}{n}+{c}} \\\\\\\\ &\\\\,= \\\\simplify[!collectNumbers,unitFactor]{{a}{n^2}+{b*n}+{c}} \\\\\\\\ &\\\\,=\\\\simplify{{a*n^2+b*n+c}}. \\\\end{split} \\\\]
\"", "description": "", "templateType": "long string", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\begin{split} g(\\\\var{n}) &\\\\,= \\\\simplify[alwaysTimes,unitFactor]{{a}{n}^2+{b}{n}+{c}} \\\\\\\\ &\\\\,= \\\\simplify[!collectNumbers,unitFactor]{{a}{n^2}+{b*n}+{c}} \\\\\\\\ &\\\\,=\\\\simplify[,!collectNumbers,unitFactor]{{a*n^2}+{b*n}+{c}}\\\\\\\\ &\\\\,=\\\\simplify{{a*n^2+b*n+c}}. \\\\end{split} \\\\]
\"", "description": "", "templateType": "long string", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "n", "check", "sol1", "sol2"], "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": "$g(\\var{n})=$[[0]]
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a*n^2+b*n+c}", "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", "type": "question", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}