// Numbas version: exam_results_page_options {"name": "Numbas: Inputting powers", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "s", "d", "f"], "name": "Numbas: Inputting powers", "tags": ["brackets", "input", "introduction", "Numbas", "numbas", "powers"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "
Input $e^{\\simplify{{a}x}}$. [[0]]
\nNotice that your input appears in mathematical notation next to the input box so that you can check that you have entered it correctly.
\nClick on Submit part to check your answer.
\n\n\n
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 1e-05, "vsetrange": [0, 0.1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "e^({a}*x)", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "
Input $x^{\\simplify{{c} + {d}}}$.
\n[[0]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "x^({c+d})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "Input $(xy)^{\\var{f}}$
\n[[0]]
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Input in the form $x^ay^b$ for suitable values of $a$ and $b$.
", "showStrings": false, "strings": ["xy", "x*y"], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "(x*y)^{f}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "This example shows you how to input powers.
\n$a^b$ is input as a^b
.
But you have to be careful with inputting such expressions as
\n\\[e^{2x},\\;x^{-2},\\;(xy)^2\\]
\nFor these you must enclose the power in brackets.
\nExpression | Correct Input | Incorrect Input | Why it's wrong |
---|---|---|---|
$e^{2x}$ | \ne^(2*x) | \ne^2*x | \nThe system thinks this is $(e^2) \\cdot x$. | \n
$x^{-2}$ | \nx^(-2) | \nx^-2 | \nThis does not make any sense to the system. | \n
$(xy)^2$ | \n(x*y)^2 | \nx*y^2 | \nThe system thinks this is $x \\cdot (y^2)$. | \n
Try the following examples.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(6..12)*s", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(-12..-6)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "f": {"definition": "random(-5,-4,-3,-2,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "s": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "d": {"definition": "random(-12..-6)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}}, "metadata": {"description": "Information on inputting powers.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}