// Numbas version: exam_results_page_options {"name": "Determine the equation of a graph with absolute value of y=x with horzontal and vertical shift (Test 1 Q8a)", "extensions": ["eukleides"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Determine the equation of a graph with absolute value of y=x with horzontal and vertical shift (Test 1 Q8a)", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": ["eukleides"], "variables": {"abs_val_graph": {"name": "abs_val_graph", "group": "Ungrouped variables", "definition": "eukleides(\"Absolute value of function graph\",[\n[\n // box -10, -10, 10, 10\n let(\n h, -h_shift\n ,v, v_shift\n ,A , point(h,v)\n ,[\n // origin dot\n // , A dot color2,\n(point(0,10) .. point(0,0) .. point(10,0)) arrows\n,(point(-10,0)..point(0,0)..point(0,-10)) arrows\n ,point(0,10) label(\"y\",deg(0)) \n ,point(10,0) label(\"x\",deg(90)) \n\n ,line(origin,deg(45))dashed half \n ,line(origin,deg(135)) half dashed\n \n ,line(point(h,v),deg(45)) half \n , line(point(h,v),deg(135)) half\n \n ,(point(h,v).. point(0,v)) dotted\n ,(point(h,v).. point(h,0)) dotted\n \n ,point(0,v) label(v)\n ,point(h,0) label(h)\n ]\n )]*size(4)\n\n],[\"h\": h_shift, \"v\": v_shift])", "description": "", "templateType": "anything"}, "h_shift": {"name": "h_shift", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything"}, "v_shift": {"name": "v_shift", "group": "Ungrouped variables", "definition": "random(-5..5 except [0, h_shift, -h_shift])", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["abs_val_graph", "h_shift", "v_shift"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The graph of $\\simplify{y=abs(x)}$ is shown below using a dashed line. Find an equation for the solid line shown on the graph below.

\n

{max_width(25,abs_val_graph)}

", "answer": "y=abs(x+{h_shift})+{v_shift}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.001", "failureRate": 1, "vsetRangePoints": "5", "vsetRange": ["-10", "10"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "maxlength": {"length": "0", "partialCredit": "0", "message": ""}, "minlength": {"length": "0", "partialCredit": "0", "message": ""}, "valuegenerators": [{"name": "x", "value": "-10..10"}, {"name": "y", "value": "abs(x+{h_shift})+{v_shift}"}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Melissa Heath", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3309/"}]}]}], "contributors": [{"name": "Melissa Heath", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3309/"}]}