// Numbas version: exam_results_page_options {"name": "NA Find full price given discount (10+)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "NA Find full price given discount (10+)", "tags": ["LANTITE", "Western Sydney MESH"], "metadata": {"description": "

Used for LANTITE preparation (Australia). NA = Number & Algebra strand. Students are given the number of years worked, and the price paid. They use the table to look up the percentage discount, then calculate the full price. The number of years and price paid are randomised.

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

Employees of the MegaShoppa chain of stores are offered a staff discount on any items they buy from the store. The discount is based on the number of years of service and is detailed in the table below.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Years of serviceDiscount (%)
1 - 44
5 - 98
10 - 1412
15 - 1916
20 - 2420
", "advice": "
\n
\n

{name1} has worked for Megashoppa for {years} years.

\n

From the table, the relevant percentage discount is {pdiscount}%.

\n

Using this discount, {name1} paid {100-pdiscount}%  (100% - {pdiscount}% ) of the full price.

\n

{100-pdiscount}% of the full price = \\${formatnumber(amountpaid,'si-en')}.

\n

To find the full price, divide this amount by {100-pdiscount} to calculate 1% of the full price, then multiply by 100.  (This is called the unitary method)

\n

\\${formatnumber(amountpaid,'si-en')} ÷ {100-pdiscount} = \\${amountpaid ÷ (100-pdiscount)}     (this is 1% of the full price)

\n

\\${amountpaid ÷ (100-pdiscount)} x 100 = \\${formatnumber(fullprice,'si-en')}

\n

The full price was \\${formatnumber(fullprice,'si-en')}.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"loyaltyfactor": {"name": "loyaltyfactor", "group": "Ungrouped variables", "definition": "(trunc(years/5))+1", "description": "
\n
\n
\n

The loyalty factor, based on years served. This is then scaled up to get the percentage discount.

", "templateType": "anything", "can_override": false}, "name1": {"name": "name1", "group": "Ungrouped variables", "definition": "random('Sam', 'Tino','Julie','Steve','Mia','Gemma','Lucy','Noah','Madi')", "description": "
\n
\n

The list of names. One is randomly selected.

", "templateType": "anything", "can_override": false}, "amountpaid": {"name": "amountpaid", "group": "Ungrouped variables", "definition": "(1-pdiscount/100)*fullprice", "description": "
\n
\n

This is the discounted amount. It is given in the question, but calculated from the full price (the answer).

", "templateType": "anything", "can_override": false}, "fullprice": {"name": "fullprice", "group": "Ungrouped variables", "definition": "random(200 .. 4000#100)", "description": "
\n
\n

This is the full price (original price) of the item.

", "templateType": "randrange", "can_override": false}, "years": {"name": "years", "group": "Ungrouped variables", "definition": "random(2..24)", "description": "
\n
\n

The number of years the employee has worked for MegaShoppa.

", "templateType": "anything", "can_override": false}, "pdiscount": {"name": "pdiscount", "group": "Ungrouped variables", "definition": "4*loyaltyfactor", "description": "
\n
\n
\n

This is the percentage discount the employee gets, based on their years served (which the loyaltyfactor variable includes).

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["name1", "years", "loyaltyfactor", "pdiscount", "fullprice", "amountpaid"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

{name1} has worked for Megashoppa for {years} years and paid \\${formatnumber(amountpaid,'si-en')} for an item, using the staff discount.

\n

What was the full price of the item? Do not enter the dollar sign.

", "minValue": "fullprice", "maxValue": "fullprice", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}]}]}], "contributors": [{"name": "Adelle Colbourn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2083/"}]}