// Numbas version: finer_feedback_settings {"name": "1.2.4.1 Rewrite an expression using a positive index", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.2.4.1 Rewrite an expression using a positive index", "tags": [], "metadata": {"description": "

Given an expression (either a^-k or 1/a^-k) with a negative index, rewrite it with a positive index.

\n

The variable a and the index k are randomised.

\n

Part of HELM Book 1.2

\n

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Write $\\displaystyle{\\var{expr}}$ using a positive index.

", "advice": "

\\[\\var{expr}=\\frac{1}{\\var{v}^{\\var{idx}}}\\]

\n

\\[\\var{expr}=\\var{v}^{\\var{idx}}\\]

\n

\\[=\\var{v}\\]

\n

\\[=\\frac{1}{\\var{v}}\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"expr": {"name": "expr", "group": "Ungrouped variables", "definition": "if(isFrac,\n expression(letter + \"^-\" + idx),\n expression(\"1/\" + letter + \"^-\" + idx)\n)", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "if(isFrac,\n expression(\"1/\" + letter + \"^\" + idx),\n expression(letter + \"^\" + idx)\n)", "description": "", "templateType": "anything", "can_override": false}, "idx": {"name": "idx", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "can_override": false}, "letter": {"name": "letter", "group": "Ungrouped variables", "definition": "random(random(alphabet),random(2..20))", "description": "", "templateType": "anything", "can_override": false}, "alphabet": {"name": "alphabet", "group": "Ungrouped variables", "definition": "['a','b','c','d','f','g','h','k','m','n','p','q','r','s','t','v','w','x','y','z']", "description": "", "templateType": "anything", "can_override": false}, "isFrac": {"name": "isFrac", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "

Is the answer a fraction?

", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "if(type(letter)=\"string\",\n expression(letter),\n expression(string(letter))\n)", "description": "

The expression version of the variable so that it displays correctly in the advice.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["alphabet", "letter", "idx", "isFrac", "expr", "ans", "v"], "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, "answer": "{ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": ["0.4", "0.8"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}