// Numbas version: exam_results_page_options {"name": "Basic Algebraic Manipulation: Completing the square", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": [], "metadata": {"description": "

Several quadratics are given and students are asked to complete the square.

", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {}, "variables": {"q": {"description": "", "name": "q", "definition": "map(expression('{vari[j]}^2+{2*a[j]}*{vari[j]}+ {a[j]^2+b[j]}'),j,0..4)", "templateType": "anything", "group": "Ungrouped variables"}, "a": {"description": "", "name": "a", "definition": "[random(1..5),\n random(1..5)*-1,\n random(-5..5)*random(-1..1#2),\n random(6..9)*random(-1..1#2),\n random(6..9)*random(-1..1#2)]", "templateType": "anything", "group": "Ungrouped variables"}, "test2": {"description": "", "name": "test2", "definition": "q[0]", "templateType": "anything", "group": "Ungrouped variables"}, "c": {"description": "

the c from qnoc

", "name": "c", "definition": "", "templateType": "anything", "group": "Ungrouped variables"}, "qnoc": {"description": "

", "name": "qnoc", "definition": "map(expression('{vari[j]}^2+{2*a[j]}*{vari[j]}'),j,0..4)", "templateType": "anything", "group": "Ungrouped variables"}, "ans": {"description": "", "name": "ans", "definition": "map(expression('({vari[j]}+{a[j]})^2+{b[j]}'),j,0..4)", "templateType": "anything", "group": "Ungrouped variables"}, "b": {"description": "", "name": "b", "definition": "shuffle([random(11..25), \n random(11..25),\n random(-25..-11),\n random(-25..-11),\n random(-25..-11)\n ])", "templateType": "anything", "group": "Ungrouped variables"}, "vari": {"description": "", "name": "vari", "definition": "shuffle(['c','d','t','y','z','r'])", "templateType": "anything", "group": "Ungrouped variables"}, "test": {"description": "", "name": "test", "definition": "ans[0]", "templateType": "anything", "group": "Ungrouped variables"}}, "statement": "

Carry out the 'completing the square' method on the following quadratic expressions.

", "parts": [{"sortAnswers": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "prompt": "

\$\\simplify{{q[0]}} = \$ [[0]]

", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "type": "gapfill", "showFeedbackIcon": true, "gaps": [{"failureRate": 1, "scripts": {}, "marks": "1", "checkVariableNames": false, "showPreview": true, "vsetRangePoints": 5, "type": "jme", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "unitTests": [], "notallowed": {"message": "

", "showStrings": false, "partialCredit": 0, "strings": ["x^2", "x*x", "x x", "x(", "x*("]}, "musthave": {"message": "

please input in the form \$(x+a)^2+b\$

", "showStrings": false, "partialCredit": 0, "strings": ["(", ")", "^"]}, "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "answerSimplification": "std", "vsetRange": [0, 1], "expectedVariableNames": [], "answer": "{ans[0]}", "variableReplacements": [], "checkingType": "absdiff", "showFeedbackIcon": true}]}, {"sortAnswers": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "prompt": "

\$\\simplify{{q[1]}} = \$ [[0]]

", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "type": "gapfill", "showFeedbackIcon": true, "gaps": [{"failureRate": 1, "scripts": {}, "marks": "1", "checkVariableNames": false, "showPreview": true, "vsetRangePoints": 5, "type": "jme", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "unitTests": [], "notallowed": {"message": "

", "showStrings": false, "partialCredit": 0, "strings": ["x^2", "x*x", "x x", "x(", "x*("]}, "musthave": {"message": "

please input in the form \$(x+a)^2+b\$

", "showStrings": false, "partialCredit": 0, "strings": ["(", ")", "^"]}, "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "answerSimplification": "std", "vsetRange": [0, 1], "expectedVariableNames": [], "answer": "{ans[1]}", "variableReplacements": [], "checkingType": "absdiff", "showFeedbackIcon": true}]}, {"sortAnswers": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "prompt": "

\$\\simplify{{q[2]}} = \$ [[0]]

", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "type": "gapfill", "showFeedbackIcon": true, "gaps": [{"failureRate": 1, "scripts": {}, "marks": "1", "checkVariableNames": false, "showPreview": true, "vsetRangePoints": 5, "type": "jme", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "unitTests": [], "notallowed": {"message": "

", "showStrings": false, "partialCredit": 0, "strings": ["x^2", "x*x", "x x", "x(", "x*("]}, "musthave": {"message": "

please input in the form \$(x+a)^2+b\$

", "showStrings": false, "partialCredit": 0, "strings": ["(", ")", "^"]}, "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "answerSimplification": "std", "vsetRange": [0, 1], "expectedVariableNames": [], "answer": "{ans[2]}", "variableReplacements": [], "checkingType": "absdiff", "showFeedbackIcon": true}]}, {"sortAnswers": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "prompt": "

\$\\simplify{{q[3]}} = \$ [[0]]

", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "type": "gapfill", "showFeedbackIcon": true, "gaps": [{"failureRate": 1, "scripts": {}, "marks": "1", "checkVariableNames": false, "showPreview": true, "vsetRangePoints": 5, "type": "jme", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "unitTests": [], "notallowed": {"message": "

", "showStrings": false, "partialCredit": 0, "strings": ["x^2", "x*x", "x x", "x(", "x*("]}, "musthave": {"message": "

please input in the form \$(x+a)^2+b\$

", "showStrings": false, "partialCredit": 0, "strings": ["(", ")", "^"]}, "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "answerSimplification": "std", "vsetRange": [0, 1], "expectedVariableNames": [], "answer": "{ans[3]}", "variableReplacements": [], "checkingType": "absdiff", "showFeedbackIcon": true}]}, {"sortAnswers": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "prompt": "

\$\\simplify{{q[4]}} = \$ [[0]]

", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "type": "gapfill", "showFeedbackIcon": true, "gaps": [{"failureRate": 1, "scripts": {}, "marks": "1", "checkVariableNames": false, "showPreview": true, "vsetRangePoints": 5, "type": "jme", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "unitTests": [], "notallowed": {"message": "

", "showStrings": false, "partialCredit": 0, "strings": ["x^2", "x*x", "x x", "x(", "x*("]}, "musthave": {"message": "

please input in the form \$(x+a)^2+b\$

", "showStrings": false, "partialCredit": 0, "strings": ["(", ")", "^"]}, "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "answerSimplification": "std", "vsetRange": [0, 1], "expectedVariableNames": [], "answer": "{ans[4]}", "variableReplacements": [], "checkingType": "absdiff", "showFeedbackIcon": true}]}, {"sortAnswers": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "prompt": "

What constant is required to 'complete the square' for \$\\simplify{{qnoc[0]}}\$ in?

", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "type": "gapfill", "showFeedbackIcon": true, "gaps": [{"minValue": "{c}", "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxValue": "{c}", "correctAnswerStyle": "plain", "marks": 1, "correctAnswerFraction": false, "mustBeReducedPC": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showCorrectAnswer": true, "mustBeReduced": false, "customMarkingAlgorithm": "", "unitTests": [], "type": "numberentry", "allowFractions": false, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"]}]}], "tags": [], "preamble": {"css": "", "js": ""}, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "advice": "

See 2.3 and 2.5 for background and examples

", "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Basic Algebraic Manipulation: Completing the square", "ungrouped_variables": ["a", "b", "q", "ans", "test", "test2", "vari", "qnoc", "c"], "variable_groups": [], "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Benjamin Bui", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3123/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Benjamin Bui", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3123/"}]}