// Numbas version: finer_feedback_settings
{"name": "2.6.7 Circle inequality no 2", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "2.6.7 Circle inequality no 2", "tags": [], "metadata": {"description": "
Given a circle centre and radius, write an appropriate inequality for the region either inside or outside the circle.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "State an inequality that describes the points that lie inside outside the circle of radius $\\var{radius}$ with centre $(\\var{centrex}, \\var{centrey})$.
", "advice": "The points outside the circle are the points that are further from the centre than the distance of the radius.
\nThe points inside the circle are the points that are closer to the centre than the distance of the radius.
\nThus, putting the centre coordinates and the radius into the circle equation and then writing the inequality gives:
\n$\\var{inequality}$
\nThe diagram shows the area that satisfies the inequality shaded in cyan.
\n{correctgraph}
", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"centrex": {"name": "centrex", "group": "The inequality", "definition": "random(-9..9)", "description": "", "templateType": "anything", "can_override": false}, "centrey": {"name": "centrey", "group": "The inequality", "definition": "random(-9..9)", "description": "", "templateType": "anything", "can_override": false}, "radiussquared": {"name": "radiussquared", "group": "The inequality", "definition": "weighted_random([[random([1,4,9,16,25,36,49,64,81]),0.8],[random(1..99),0.2]])", "description": "", "templateType": "anything", "can_override": false}, "radius": {"name": "radius", "group": "The inequality", "definition": "simplify(expression(\"sqrt(\"+radiussquared+\")\"),\"sqrtSquare\")", "description": "", "templateType": "anything", "can_override": false}, "inequality": {"name": "inequality", "group": "The inequality", "definition": "simplify(expression(\"(x-\"+centrex+\")^2+(y-\"+centrey+\")^2\"+if(idx=0,\">\",\"<\")+radiussquared),\"all\")", "description": "", "templateType": "anything", "can_override": false}, "idx": {"name": "idx", "group": "The inequality", "definition": "random(0,1)", "description": "Selector
\n0 => >
\n1 => <
", "templateType": "anything", "can_override": false}, "correctgraph": {"name": "correctgraph", "group": "The graph", "definition": "jessiecode(\n 400,400,[{xmin},{ymax},{xmax},{ymin}],\"incolor={incolor};outcolor={outcolor};xmin={xmin};ymin={ymin};xmax={xmax};ymax={ymax};R={radius};Cx={centrex};Cy={centrey};\"+safe(\n \"\"\"\n p=polygon([xmin,ymin],[xmin,ymax],[xmax,ymax],[xmax,ymin]) <>;\n C=point(Cx,Cy) <>;\n C1=circle(C,R) <>;\n \"\"\"),\n [\n \"axis\": true,\n ]\n) ", "description": "", "templateType": "anything", "can_override": false}, "xmax": {"name": "xmax", "group": "The graph", "definition": "if(xmaxtemp-xmin > ymaxtemp-ymin,xmaxtemp,xmin+ymaxtemp-ymin)", "description": "", "templateType": "anything", "can_override": false}, "xmin": {"name": "xmin", "group": "The graph", "definition": "min(-1,centrex-ceil(eval(radius))-1)", "description": "", "templateType": "anything", "can_override": false}, "ymax": {"name": "ymax", "group": "The graph", "definition": "if(ymaxtemp-ymin > xmaxtemp-xmin,ymaxtemp,ymin+xmaxtemp-xmin)", "description": "", "templateType": "anything", "can_override": false}, "ymin": {"name": "ymin", "group": "The graph", "definition": "min(-1,centrey-ceil(eval(radius))-1)", "description": "", "templateType": "anything", "can_override": false}, "xmaxtemp": {"name": "xmaxtemp", "group": "The graph", "definition": "max(1,centrex+ceil(eval(radius))+1)", "description": "", "templateType": "anything", "can_override": false}, "ymaxtemp": {"name": "ymaxtemp", "group": "The graph", "definition": "max(1,centrey+ceil(eval(radius))+1)", "description": "", "templateType": "anything", "can_override": false}, "incolor": {"name": "incolor", "group": "The graph", "definition": "if(idx=0,\"\\'white\\'\",\"\\'cyan\\'\")", "description": "", "templateType": "anything", "can_override": false}, "outcolor": {"name": "outcolor", "group": "The graph", "definition": "if(idx=0,\"\\'cyan\\'\",\"\\'none\\'\")", "description": "", "templateType": "anything", "can_override": false}, "studentgraph": {"name": "studentgraph", "group": "The graph", "definition": "jessiecode(\n 400,400,[{xmin},{ymax},{xmax},{ymin}],\"incolor={incolor};outcolor={outcolor};xmin={xmin};ymin={ymin};xmax={xmax};ymax={ymax};R={radius};Cx={centrex};Cy={centrey};\"+safe(\n \"\"\"\n p=polygon([xmin,ymin],[xmin,ymax],[xmax,ymax],[xmax,ymin]) <>;\n C=point(Cx,Cy) <>;\n C1=circle(C,R) <>;\n \"\"\"),\n [\n \"axis\": true,\n ]\n) ", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "The inequality", "variables": ["centrex", "centrey", "radiussquared", "inequality", "radius", "idx"]}, {"name": "The graph", "variables": ["correctgraph", "xmin", "ymin", "xmaxtemp", "xmax", "ymaxtemp", "ymax", "incolor", "outcolor", "studentgraph"]}], "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": "{inequality}", "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", "type": "question", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "resources": []}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}