// Numbas version: finer_feedback_settings {"name": "Is this a function?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Is this a function?", "tags": [], "metadata": {"description": "

Given an equation or a worded formula determine if it is a function or not

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

Are the following, functions or not?

\n

", "advice": "

A function is a rule that assigns at most one output for each input.

\n

\n

For an equation such as $y=x^2+3$, we think of $x$ as the input and $y$ as the output. Since each $x$ gives at most one $y$ value this is a function.

\n

\n

Since things such as $y>x$, $y=\\pm\\sqrt{x}$ and '$y=2 \\text{ and } 3x $' give more than one $y$ value for an $x$ value these are not functions.

\n

\n

Graphically, the requirement that there is at most one $y$ value for each $x$ value means a curve is the graph of a function if it passes the 'vertical line test'. That is, if you draw vertical lines through the graph and each vertical line only cuts the graph at most once, the graph 'passes' the vertical line test and it represents a function.

\n

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"wordlist": {"name": "wordlist", "group": "Ungrouped variables", "definition": "shuffle([\n random( \n ['For each input, the output will be two numbers, one will be \\$\\\\var{n[8]}\\$ times the input and the other will be \\$\\\\var{n[9]}\\$ times the input.',0,1,'This is not a function since the output contains more than one number.'],\n ['For each input, the output will be two numbers, one will be \\$\\\\var{n[10]}\\$ times the input and the other number will be \\$\\\\var{n[11]}\\$.',0,1,'This is not a function since the output contains more than one number.'] \n ),\n random(['You input a number and you get an output of \\$\\\\var{abs(n[9])}\\$ less than the input.',1,0,'This is a function since for each input there is a single output.'],\n ['You input a number and you get an output of \\$\\\\var{abs(n[12])}\\$ more than the input.',1,0,'This is a function since for each input there is a single output.']\n)])", "description": "", "templateType": "anything", "can_override": false}, "equationlist": {"name": "equationlist", "group": "Ungrouped variables", "definition": "shuffle([\n random(\n ['\\$y=\\\\simplify{{n[0]}x^{{n[1]}}+{n[2]}\\}\\$',1,0, 'This is a function of \\$x\\$. For each \\$x\\$ the result of the right-hand side of the equation is a single number \\$y\\$.'] ,\n ['\\$f(x)=\\\\var{n[3]}\\$',1,0, 'This is a function of \\$x\\$. For each \\$x\\$ the result of the right-hand side of the equation is a single number \\$f(x)\\$.'],\n ['\\$y=\\\\sqrt{\\\\simplify{{abs(n[6])}x+{n[7]}}}\\$',1,0, 'This is a function of \\$x\\$. For each \\$x\\$ in the domain, the result of the right-hand side of the equation is a single number \\$y\\$.'],\n ['\\$y=-\\\\sqrt{\\\\simplify{{-abs(n[15])}x+{n[16]}}}\\$',1,0, 'This is a function of \\$x\\$. For each \\$x\\$ in the domain, the result of the right-hand side of the equation is a single number \\$y\\$.'],\n ['\\$y=\\\\var{n[10]}x\\$ and \\$\\\\var{n[11]}x\\$',0,1, 'This is not a function of \\$x\\$. For each \\$x\\$ we have two corresponding \\$y\\$ values.'],\n ['\\$y=\\\\pm \\\\sqrt{\\\\simplify{{abs(n[4])}x+{n[5]}}}\\$',0,1, 'This is not a function of \\$x\\$. For each \\$x\\$ we have two corresponding \\$y\\$ values (a positive and a negative value).']\n ), \n random( \n ['\\$y>\\\\simplify{{n[13]}x+{n[14]}\\}\\$', 0,1, 'This is not a function of \\$x\\$. For each \\$x\\$ we have more than one corresponding \\$y\\$ value (we actually have an infinite number of them).'],\n ['\\$y\\\\leq\\\\simplify{{n[13]}x+{n[14]}\\}\\$', 0,1, 'This is not a function of \\$x\\$. For each \\$x\\$ we have more than one corresponding \\$y\\$ value (we actually have an infinite number of them).'],\n ['\\$y<\\\\simplify{{n[13]}x+{n[14]}\\}\\$', 0,1, 'This is not a function of \\$x\\$. For each \\$x\\$ we have more than one corresponding \\$y\\$ value (we actually have an infinite number of them).'],\n ['\\$y\\\\ge\\\\simplify{{n[13]}x+{n[14]}\\}\\$',0,1, 'This is not a function of \\$x\\$. For each \\$x\\$ we have more than one corresponding \\$y\\$ value (we actually have an infinite number of them).']\n)\n])", "description": "

want to choose some of these randomly each time...

", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "shuffle(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "equationlist", "wordlist"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "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": "

{equationlist[0][0]}

\n

", "stepsPenalty": "1", "steps": [{"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": "

{equationlist[0][3]}

"}], "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

Function

", "

Not a function

"], "matrix": "equationlist[0][1..3]"}, {"type": "1_n_2", "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": "

{equationlist[1][0]}

", "stepsPenalty": "1", "steps": [{"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": "

{equationlist[1][3]}

"}], "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

Function

", "

Not a function

"], "matrix": "equationlist[1][1..3]"}, {"type": "1_n_2", "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": "

{wordlist[0][0]}

", "stepsPenalty": "1", "steps": [{"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": "

{wordlist[0][3]}

"}], "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

Function

", "

Not a function

"], "matrix": "wordlist[0][1..3]"}, {"type": "1_n_2", "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": "

{wordlist[1][0]}

", "stepsPenalty": "1", "steps": [{"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": "

{wordlist[1][3]}

"}], "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

Function

", "

Not a function

"], "matrix": "wordlist[1][1..3]"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "resources": []}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}