// Numbas version: finer_feedback_settings {"name": "NC NA Create an algebraic expression from a word problem and simplify (sweets) (10+)", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "NC NA Create an algebraic expression from a word problem and simplify (sweets) (10+)", "tags": ["LANTITE"], "metadata": {"description": "
Used for LANTITE preparation (Australia). NC = Non Calculator strand. NA = Number & Algebra strand. Given a description in words of the costs of some items in terms of an unknown cost, write down an expression for the total cost of a selection of items. Then simplify the expression. The word problem is about the costs of sweets in a sweet shop. The quantity of each type of sweet is randomised.
\nThis question was modified from a Newcastle University question.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "\n\n\n\n\n\n\n\n{name1} eats a lot of sweets. You are trying to work out the cost of the sweets that {name1} ate last month.
\n{name1} ate $\\var{a1}$ lollipops, $\\var{b1}$ chocolate bars and $\\simplify{{c1}}$ giant jelly snakes.
\nYou know that a chocolate bar costs $\\$1$ more than a lollipop, and a giant jelly snake costs half the price of a chocolate bar.
", "advice": "We are told that the price of a lollipop is represented by the letter $x$.
\nA chocolate bar costs $\\$1$ more than a lollipop, so the price of a chocolate bar can be represented by $x+1$.
\nA giant jelly snake costs half as much as a chocolate bar, so the price of a giant jelly snake can be represented by$\\frac{1}{2}(x+1)$.
\n\nTo find the total cost, multiply the expressions above for the cost of each kind of sweet by the number of sweets eaten, and add the three terms together.
\nWithout simplifying, we obtain:
\n\\begin{align}
\\text{Cost} &= \\simplify[]{{a1}x+{b1}(x+1) + {c1}*(1/2)*(x+1)} \\\\
&= \\simplify[]{{a1}x+{b1}(x+1) + {c1/2}*(x+1)}
\\text{.}
\\end{align}
The first step in simplifying this expression is to expand both sets of brackets:
\n\\begin{align}
\\simplify[]{ {a1}x + {b1}(x+1) + {c1/2}*(x+1)} &= \\var{a1}x + \\simplify[alwaystimes]{{b1}x + {b1}1 + {c1/2}x + {c1/2}1} \\\\
&= \\simplify[] { {a1}x + {b1}x + {b1} + {c1/2}x + {c1/2} } \\text{.}
\\end{align}
Finally, collect like terms:
\n\\begin{align}
\\simplify[] { {a1}x + {b1}x + {b1} + {c1/2}x + {c1/2} } &= \\simplify[]{ {a1+b1+c1/2}x + {b1+c1/2} } \\text{.}
\\end{align}
The correct algebraic expression for the overall cost of the sweets {name1} ate, in terms of $x$ is $\\simplify[]{ {a1+b1+c1/2}x + {b1+c1/2} } \\text{.}$
", "rulesets": {}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"name1": {"name": "name1", "group": "Ungrouped variables", "definition": "random('Jerry','Jessica','Luke','Lisa','Sam','Tom','Tina','Mark','Maria')", "description": "\n\n\n\nThe name of the lolly eater.
", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Number of packets eaten", "definition": "random(5..10)", "description": "\n\n\nNumber of lollipops eaten
", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Number of packets eaten", "definition": "random(2..10 except a1)", "description": "\n\n\n\nNumber of chocolate bars eaten
", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Number of packets eaten", "definition": "random(2..5)*2", "description": "\n\n\n\nNumber of giant jelly snakes eaten.
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "gcd(a1,b1+c1/2)=1", "maxRuns": 100}, "ungrouped_variables": ["name1"], "variable_groups": [{"name": "Number of packets eaten", "variables": ["a1", "b1", "c1"]}], "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": "Let the cost of a lollipop be $\\$x$.
\nWhich is the correct algebraic expression for the overall cost of the sweets {name1} ate, in terms of $x$?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["$\\simplify[]{ {a1+b1+c1/2}x + {b1+c1/2} }$", "$\\simplify[]{ {a1+b1+c1}x }$", "$\\simplify[]{ 5x/2 + 1.5 }$", "$\\simplify[]{ {a1+b1+c1/2}x + 2 }$"], "matrix": ["1", 0, 0, 0], "distractors": ["Well done!", "Have you considered the differing costs of the three different types of sweets?", "Have you considered the different quantities of each type of sweet?", "Check your expansion of brackets - have you multiplied both terms inside the bracket by the factor outside the bracket?"]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}]}