// Numbas version: exam_results_page_options {"name": "Numbas tutorial: arithmetic (finished)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"preventleave": false, "allowregen": true, "showfrontpage": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": [], "advice": "

#### a)

\n

$\\var{a}+\\var{b} = \\var{a+b}$

\n

#### b)

\n

$\\var{a} \\times \\var{b} = \\var{a*b}$

\n

#### c)

\n

Using the method of completing the square:

\n

\\begin{align}
\\simplify{x^2 + {qb}*x + {qc}} = \\simplify[std]{(x+{qb/2})^2 - {qb^2/4} + {qc}} &= \\simplify[std]{(x+{qb/2})^2}-\\left(\\simplify[std]{({sqrt(qb^2/4 - qc)})}\\right)^2 \\\\
&= \\simplify[std,!collectNumbers]{(x+{qb/2}-{sqrt(qb^2/4 - qc)})(x+{qb/2}+{sqrt(qb^2/4 - qc)})} & \\text{(difference of two squares)} \\\\
&= \\simplify[std]{(x+{qb/2}-{sqrt(qb^2/4 - qc)})(x+{qb/2}+{sqrt(qb^2/4 - qc)})}
\\end{align}

", "rulesets": {"std": ["all", "fractionnumbers"]}, "metadata": {"description": "

The question created during the \"Write your first question\" tutorial.

", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"js": "", "css": ""}, "statement": "", "ungrouped_variables": ["a", "b", "c", "d", "x0", "x1", "qb", "qc"], "name": "Numbas tutorial: arithmetic (finished)", "variable_groups": [], "tags": [], "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"variableReplacementStrategy": "originalfirst", "marks": 1, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "correctAnswerFraction": false, "variableReplacements": [], "prompt": "

What is $\\var{a}+\\var{b}$?

", "maxValue": "a+b", "showCorrectAnswer": true, "allowFractions": false, "showFeedbackIcon": true, "minValue": "a+b", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "scripts": {}, "mustBeReduced": false}, {"variableReplacementStrategy": "originalfirst", "marks": 1, "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "correctAnswerFraction": false, "variableReplacements": [], "prompt": "

What is $\\var{c} \\times \\var{d}$?

", "maxValue": "c*d", "showCorrectAnswer": true, "allowFractions": false, "showFeedbackIcon": true, "minValue": "c*d", "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "scripts": {}, "mustBeReduced": false}, {"showpreview": true, "marks": 1, "checkingaccuracy": 0.001, "expectedvariablenames": [], "checkingtype": "absdiff", "variableReplacements": [], "checkvariablenames": false, "prompt": "

Factorise $\\simplify{ x^2 + {x0+x1}*x + {x0*x1} }$.

", "showFeedbackIcon": true, "showCorrectAnswer": true, "vsetrangepoints": 5, "notallowed": {"strings": ["^"], "message": "", "partialCredit": 0, "showStrings": false}, "vsetrange": [0, 1], "answer": "(x+{x0})(x+{x1})", "musthave": {"strings": ["(", ")"], "message": "", "partialCredit": 0, "showStrings": false}, "type": "jme", "scripts": {}, "variableReplacementStrategy": "originalfirst"}], "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/", "name": "Christian Lawson-Perfect"}], "variables": {"d": {"description": "", "templateType": "anything", "definition": "random(-9..9)", "group": "Ungrouped variables", "name": "d"}, "a": {"description": "", "templateType": "anything", "definition": "random(1..9)", "group": "Ungrouped variables", "name": "a"}, "qb": {"description": "", "templateType": "anything", "definition": "//coefficient of the x term in the quadratic\n x0+x1", "group": "Ungrouped variables", "name": "qb"}, "x0": {"description": "", "templateType": "anything", "definition": "// first root of the quadratic\n random(-9..9 except 0)", "group": "Ungrouped variables", "name": "x0"}, "b": {"description": "", "templateType": "anything", "definition": "random(1..9)", "group": "Ungrouped variables", "name": "b"}, "qc": {"description": "", "templateType": "anything", "definition": "//the constant term in the quadratic\n x0*x1", "group": "Ungrouped variables", "name": "qc"}, "c": {"description": "", "templateType": "anything", "definition": "random(-9..9)", "group": "Ungrouped variables", "name": "c"}, "x1": {"description": "", "templateType": "anything", "definition": "// the other root of the quadratic\n // use except x0 to avoid repeated roots\n random(-9..9 except [x0,0])", "group": "Ungrouped variables", "name": "x1"}}, "type": "question"}]}], "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/", "name": "Christian Lawson-Perfect"}]}