// Numbas version: exam_results_page_options {"name": "Using compound units - room hire price per hour and per minute", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Using compound units - room hire price per hour and per minute", "tags": ["taxonomy"], "metadata": {"description": "

Given the cost of hiring a room for a given number of hours, compare with competing prices given per hour and per minute.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

{pname} has been tasked with booking a room for a {hours}-hour meeting.

", "advice": "

a)

\n

The price per hour is the total price divide by the number of hours.

\n

\\[ \\text{Price per hour} = \\frac{\\var{block_price_per_hour*hours}}{\\var{hours}} = £\\var{dpformat(block_price_per_hour,2)} \\text{ per hour} \\]

\n

b)

\n

The price is given in pence per minute. To convert to pounds per minute, divide by $100$:

\n

\\[ \\var{100*competitor_price_per_minute} \\text{ p/minute} = £\\var{dpformat(competitor_price_per_minute,2)} \\text{ per minute} \\]

\n

Then to convert to pounds per hour, multiply by $60$:

\n

\\[ £\\var{dpformat(competitor_price_per_minute,2)} \\text{ per minute} = £\\var{dpformat(competitor_price_per_minute*60,2)} \\text{ per hour} \\]

\n

c)

\n

{pname} should choose the method with the lowest cost per hour, which is {best_method}.

", "rulesets": {}, "extensions": ["random_person"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"competitor_price_per_minute": {"name": "competitor_price_per_minute", "group": "Ungrouped variables", "definition": "floor(100*block_price_per_hour/60*(1+random(0.1..0.3#0)*random(-1,1)))/100", "description": "

Price of booking at RoomCo, the competitor, in pounds per minute

", "templateType": "anything", "can_override": false}, "pronouns": {"name": "pronouns", "group": "Person", "definition": "person['pronouns']", "description": "", "templateType": "anything", "can_override": false}, "best_method": {"name": "best_method", "group": "Ungrouped variables", "definition": "switch(\n min(prices)=block_price_per_hour,\n 'paying in advance at ACME',\n min(prices)=single_price_per_hour,\n 'pay-as-you-go at ACME',\n 'paying per minute at RoomCo'\n)", "description": "

A description of the cheapest method.

", "templateType": "anything", "can_override": false}, "block_price_per_hour": {"name": "block_price_per_hour", "group": "Ungrouped variables", "definition": "random(10..25#0.25)", "description": "

Price of booking the room at ACME in advance, in pounds per hour

", "templateType": "anything", "can_override": false}, "hours": {"name": "hours", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "

Length of the meeting in hours

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Person", "definition": "person['name']", "description": "", "templateType": "anything", "can_override": false}, "marking_matrix": {"name": "marking_matrix", "group": "Ungrouped variables", "definition": "let(best,min(prices),\n map(if(x=best,1,0),x,prices)\n)", "description": "

Marking matrix for the \"which method is best\" part.

", "templateType": "anything", "can_override": false}, "single_price_per_hour": {"name": "single_price_per_hour", "group": "Ungrouped variables", "definition": "block_price_per_hour+random(0.5..2#0.25)*random(-1,1)", "description": "

Pay-as-you-go price at ACME, in pounds per hour

", "templateType": "anything", "can_override": false}, "verbs": {"name": "verbs", "group": "Person", "definition": "if(person['gender']='neutral','','s')", "description": "", "templateType": "anything", "can_override": false}, "prices": {"name": "prices", "group": "Ungrouped variables", "definition": "[block_price_per_hour,single_price_per_hour,60*competitor_price_per_minute]", "description": "", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Person", "definition": "random_person()", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["hours", "block_price_per_hour", "single_price_per_hour", "competitor_price_per_minute", "marking_matrix", "prices", "best_method"], "variable_groups": [{"name": "Person", "variables": ["person", "pronouns", "pname", "verbs"]}], "functions": {"pounds": {"parameters": [["n", "number"]], "type": "string", "language": "jme", "definition": "currency(n,\"\u00a3\",\"p\")"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "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": "

{pname} is quoted a price of {pounds(block_price_per_hour*hours)} by ACME Office Services to book a room in advance for {hours} hours, or {pounds(single_price_per_hour)} per hour in a pay-as-you-go scheme.

\n

To compare the two prices, {pronouns['they']} decide{verbs} to convert the advance booking price to a price per hour.

\n

Price per hour: £ [[0]]

", "gaps": [{"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, "minValue": "block_price_per_hour", "maxValue": "block_price_per_hour", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "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": "

A competitor, RoomCo, is offering meeting rooms charged by the minute, at {pounds(competitor_price_per_minute)} per minute.

\n

To compare this price to ACME's offer, {pname} decide{verbs} to convert it to a price per hour.

\n

Price per hour: £ [[0]]

\n

", "gaps": [{"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, "minValue": "60*competitor_price_per_minute", "maxValue": "60*competitor_price_per_minute", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "

How should {pname} book the room?

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

Pay in advance at ACME

", "

Pay-as-you-go at ACME

", "

Pay per minute at RoomCo

"], "matrix": "marking_matrix"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}