// Numbas version: exam_results_page_options {"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": [{"metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

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

"}, "extensions": [], "rulesets": {}, "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

", "name": "Is this a function?", "tags": [], "ungrouped_variables": ["n", "equationlist", "wordlist"], "statement": "

Are the following, functions or not?

\n

", "variables": {"wordlist": {"templateType": "anything", "name": "wordlist", "definition": "shuffle([\n random(\n ['Given an input, the output is a number \\$\\\\var{n[8]}\\$ times the input and another number that was the input',0,1],\n ['Given an input, the output is the number \\$\\\\var{n[13]}\\$ and the number \\$\\\\var{n[14]}\\$',0,1] \n ),\n random(['You input a number and you get an output of \\$\\\\var{abs(n[9])}\\$ less than the input',1,0],\n ['You input a number and you get an output of \\$\\\\var{abs(n[12])}\\$ more than the input',1,0]\n)])", "group": "Ungrouped variables", "description": ""}, "equationlist": {"templateType": "anything", "name": "equationlist", "definition": "shuffle([\n random(\n ['\\$y=\\\\simplify{{n[0]}x^{{n[1]}}+{n[2]}\\}\\$',1,0] ,\n ['\\$f(x)=\\\\var{n[3]}\\$',1,0],\n ['\\$y=\\\\sqrt{\\\\simplify{{abs(n[6])}x+{n[7]}}}\\$',1,0],\n ['\\$y=-\\\\sqrt{\\\\simplify{{-abs(n[15])}x+{n[16]}}}\\$',1,0],\n ['\\$y=\\\\var{n[10]}x\\$ and \\$\\\\var{n[11]}x\\$',0,1],\n ['\\$y=\\\\pm \\\\sqrt{\\\\simplify{{abs(n[4])}x+{n[5]}}}\\$',0,1]\n ), \n random( \n ['\\$y>\\\\simplify{{n[13]}x+{n[14]}\\}\\$', 0,1],\n ['\\$y\\\\leq\\\\simplify{{n[13]}x+{n[14]}\\}\\$', 0,1],\n ['\\$y<\\\\simplify{{n[13]}x+{n[14]}\\}\\$', 0,1],\n ['\\$y\\\\ge\\\\simplify{{n[13]}x+{n[14]}\\}\\$',0,1]\n)\n])", "group": "Ungrouped variables", "description": "

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

"}, "n": {"templateType": "anything", "name": "n", "definition": "shuffle(-10..10 except 0)", "group": "Ungrouped variables", "description": ""}}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "", "js": ""}, "parts": [{"maxMarks": 0, "showFeedbackIcon": true, "type": "1_n_2", "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "matrix": "equationlist[0][1..3]", "prompt": "

{equationlist[0][0]}

\n

", "shuffleChoices": false, "choices": ["

Function

", "

Not a function

"], "displayColumns": 0, "displayType": "radiogroup", "minMarks": 0, "variableReplacements": []}, {"maxMarks": 0, "showFeedbackIcon": true, "type": "1_n_2", "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "matrix": "equationlist[1][1..3]", "prompt": "

{equationlist[1][0]}

", "shuffleChoices": false, "choices": ["

Function

", "

Not a function

"], "displayColumns": 0, "displayType": "radiogroup", "minMarks": 0, "variableReplacements": []}, {"maxMarks": 0, "showFeedbackIcon": true, "type": "1_n_2", "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "matrix": "wordlist[0][1..3]", "prompt": "

{wordlist[0][0]}

", "shuffleChoices": false, "choices": ["

Function

", "

Not a function

"], "displayColumns": 0, "displayType": "radiogroup", "minMarks": 0, "variableReplacements": []}, {"maxMarks": 0, "showFeedbackIcon": true, "type": "1_n_2", "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "matrix": "wordlist[1][1..3]", "prompt": "

{wordlist[1][0]}

", "shuffleChoices": false, "choices": ["

Function

", "

Not a function

"], "displayColumns": 0, "displayType": "radiogroup", "minMarks": 0, "variableReplacements": []}], "functions": {}, "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}