// Numbas version: finer_feedback_settings {"name": "Amy's copy of Question 2 Basic what is x", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["x", "y", "a", "b"], "name": "Amy's copy of Question 2 Basic what is x", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a) Lines 1 and 2 assign the values of $x$ and $y$.

\n

Line 3 reassigns a new value for $x$ by solving an equation involving the values in lines 1 and 2. This gives $x=\\simplify[basic,!collectnumbers]{{x}-{a}/{y}}$, therefore R has reassigned a new value for $x$. This is $x=\\var{{x}-{a}/{y}}$.

\n

Line 4 shows a calculation involving $x$. This bit is designed to catch you out. We haven't reassigned $x$ as a new value here so this doesn't change our $x$ value.

\n

Therefore the value of $x$ remains as $x=\\var{{x}-{a}/{y}}$.

\n

b) Line 2 assigns the value of $y$.

", "rulesets": {}, "parts": [{"prompt": "

What is the value of $x$?

", "matrix": ["1", 0, 0, 0], "shuffleChoices": true, "scripts": {}, "choices": ["

{x-(a/y)}

", "

{x-(a/y)-b}

", "

{x}

", "

{x-b}

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}, {"prompt": "

What is the value of $y$?

", "matrix": ["1", 0, 0, 0], "shuffleChoices": false, "scripts": {}, "choices": ["

{y}

", "

{x}

", "

{x+y}

", "

{y+2}

"], "marks": 0, "displayType": "radiogroup", "maxMarks": "1", "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "statement": "
> x = {x} 
> y = {y}
> x = x - ({a}/y)
> x - {b}
> x
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"y": {"definition": "random(10..20#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "y", "description": ""}, "x": {"definition": "random(2..10#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "x", "description": ""}, "b": {"definition": "random(2..10#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b", "description": ""}, "a": {"definition": "random(2..15#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "a", "description": ""}}, "metadata": {"notes": "

Advice section doesn't show up when you click reveal?

", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}]}], "contributors": [{"name": "Amy Chadwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/505/"}]}