// Numbas version: exam_results_page_options {"name": "2.1.1.1 Basic function exercise", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "2.1.1.1 Basic function exercise", "tags": [], "metadata": {"description": "
Student is shown a simple (randomised) function and asked to describe its behaviour. This is an information only question. Students need to view the advice to check their answer.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "State in words the rule of the following function.
\nUse the \"Reveal answers\" button to check your answer.
\nUse the \"Try another question like this one\" button to try a different function.
", "advice": "{ans}
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"v": {"name": "v", "group": "Ungrouped variables", "definition": "random('a','b','c','m','n','t','x','y','z')", "description": "variable name
", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random('f','g','h')", "description": "function name
", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "[random(-10..10 except [0,1]),random(-10..10 except 0),random(-30..30 except 0)]", "description": "some constants
", "templateType": "anything", "can_override": false}, "idx": {"name": "idx", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "expr": {"name": "expr", "group": "Ungrouped variables", "definition": "[\n expression(c[0]+\"*\"+v),\n simplify(expression(c[0]+\"*\"+v+\"+\"+c[2]),\"all\"),\n simplify(expression(string(simplify(expression(v+\"/\"+c[0]),\"all\"))+\"+\"+\n string(simplify(expression(+c[1]+\"/\"+c[0]),\"all\"))),\"basic\"),\n simplify(expression(c[0]+\"/(\"+c[1]+\"+\"+v+\")\"),\"all\")\n ][idx]", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "[\n \"Multiply the input by \"+c[0]+\".\",\n \"Multiply the input by \"+c[0] + \" and then \" + \n if(c[2]>0,\"add \",\"subtract \")+abs(c[2])+\".\",\n \"Divide the input by \"+c[0]+ \" and then \"+ if(c[1]/c[0]>0,\"add \",\"subtract \") + \n string(simplify(expression(abs(c[1])+\"/\"+abs(c[0])),\"all\"))+\".\",\n \"Add \"+c[1]+\" to the input, then find the reciprocal of the result, then multiply by \"+c[0]+\".\"\n ][idx]", "description": "", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "Ungrouped variables", "definition": "expression(string(simplify(expression(v+\"/\"+c[0]),\"all\"))+\"+\"+string(simplify(expression(+c[1]+\"/\"+c[0]),\"all\")))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["v", "f", "c", "idx", "expr", "ans", "test"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$\\displaystyle{\\var{expression(f)}(\\var{expression(v)})=\\var{expr}}$
"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}]}