// Numbas version: exam_results_page_options {"name": "Test Assignment", "metadata": {"description": "
In this assignment, try and find the roots of a randomly generated polynomial, using the quadratic equation.
A test assignment to see if it integrates properly into Canvas.
A simple question to find the roots of a quadratic. Using to test integration of NUmbas into Canvas.
", "licence": "All rights reserved"}, "statement": "Find one of the real roots of the quadratic \\[P(x)=\\simplify{x^2-2*{Integer}x+{integer}^2-{discriminant}}\\]
\n\n", "advice": "
To find the roots, we use the quadratic equation, which says that if the roots of the quadratic $ax^2+bx+c$ are $x_{+,-}$, then these roots are given by \\[x_{+,-}=\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}\\].
\nIn this case, we have $a=1$, $b=\\var{-2*Integer}$, and $c=\\var{Integer^2-Discriminant}$. So therefore:
\n\\[x_{+,-}=\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}=\\frac{\\var{2*Integer}\\pm\\sqrt{(\\var{-2*Integer})^2-4(1)(\\var{Integer^2-Discriminant})}}{2(1)}\\]
\n\\[=\\frac{\\var{2*Integer}\\pm\\sqrt{\\var{(-2*Integer)^2}-(\\var{(2*Integer)^2-4*Discriminant})}}{2(1)}=\\frac{\\var{2*Integer}\\pm\\sqrt{\\var{(2*Integer)^2-4*(Integer^2-Discriminant)}}}{2}=\\var{Integer}\\pm\\sqrt{\\var{Discriminant}}\\]
\nSo we have $x_{+}=\\var{Integer}+\\sqrt{\\var{Discriminant}}$, and $x_-=\\var{Integer}-\\sqrt{\\var{Discriminant}}$
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"Discriminant": {"name": "Discriminant", "group": "Ungrouped variables", "definition": "random(1 .. 18#1)", "description": "", "templateType": "randrange", "can_override": false}, "Integer": {"name": "Integer", "group": "Ungrouped variables", "definition": "random(-8..8 except 0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["Discriminant", "Integer"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Write down one of the roots, in surd notation, using the quadratic formula.
\nIf you need to use a square root, you type sqrt(), and put the quantity you are taking a square root of in the brackets. So sqrt(7) will give you $\\sqrt{7}$.
\n", "alternatives": [{"type": "jme", "useCustomName": true, "customName": "Negative Root", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "{integer}-sqrt({discriminant})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": true, "valuegenerators": []}], "answer": "{integer}+sqrt({discriminant})", "answerSimplification": "all", "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": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "warn", "message": "5 minutes left.
"}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Conor Meade", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14066/"}], "extensions": [], "custom_part_types": [], "resources": []}