// Numbas version: exam_results_page_options {"name": "David's copy of 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": [{"parts": [{"scripts": {}, "prompt": "

{name} 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]]

", "showFeedbackIcon": true, "gaps": [{"showPrecisionHint": true, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "minValue": "block_price_per_hour", "precisionType": "dp", "type": "numberentry", "strictPrecision": false, "maxValue": "block_price_per_hour", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "precision": "2", "mustBeReducedPC": 0, "scripts": {}, "mustBeReduced": false, "precisionPartialCredit": 0, "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": "1", "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"]}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"scripts": {}, "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, {name} decide{verbs} to convert it to a price per hour.

\n

Price per hour: £ [[0]]

\n

", "showFeedbackIcon": true, "gaps": [{"showPrecisionHint": true, "correctAnswerStyle": "plain", "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "minValue": "60*competitor_price_per_minute", "precisionType": "dp", "type": "numberentry", "strictPrecision": false, "maxValue": "60*competitor_price_per_minute", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "precision": "2", "mustBeReducedPC": 0, "scripts": {}, "mustBeReduced": false, "precisionPartialCredit": 0, "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 1, "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"]}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"maxMarks": 0, "showFeedbackIcon": true, "type": "1_n_2", "variableReplacementStrategy": "originalfirst", "displayColumns": "1", "scripts": {}, "prompt": "

How should {name} book the room?

", "displayType": "radiogroup", "matrix": "marking_matrix", "minMarks": 0, "choices": ["

Pay in advance at ACME

", "

Pay-as-you-go at ACME

", "

Pay per minute at RoomCo

"], "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "shuffleChoices": false}], "tags": ["taxonomy"], "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

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

", "statement": "

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

", "variablesTest": {"condition": "", "maxRuns": "100"}, "functions": {"pounds": {"type": "string", "parameters": [["n", "number"]], "definition": "currency(n,\"\u00a3\",\"p\")", "language": "jme"}}, "variables": {"pronouns": {"templateType": "anything", "definition": "person['pronouns']", "name": "pronouns", "group": "Person", "description": ""}, "marking_matrix": {"templateType": "anything", "definition": "let(best,min(prices),\n map(if(x=best,1,0),x,prices)\n)", "name": "marking_matrix", "group": "Ungrouped variables", "description": "

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

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

Length of the meeting in hours

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

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

"}, "prices": {"templateType": "anything", "definition": "[block_price_per_hour,single_price_per_hour,60*competitor_price_per_minute]", "name": "prices", "group": "Ungrouped variables", "description": ""}, "block_price_per_hour": {"templateType": "anything", "definition": "random(10..25#0.25)", "name": "block_price_per_hour", "group": "Ungrouped variables", "description": "

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

"}, "best_method": {"templateType": "anything", "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)", "name": "best_method", "group": "Ungrouped variables", "description": "

A description of the cheapest method.

"}, "name": {"templateType": "anything", "definition": "person['name']", "name": "name", "group": "Person", "description": ""}, "verbs": {"templateType": "anything", "definition": "if(person['gender']='neutral','','s')", "name": "verbs", "group": "Person", "description": ""}, "competitor_price_per_minute": {"templateType": "anything", "definition": "floor(100*block_price_per_hour/60*(1+random(0.1..0.3#0)*random(-1,1)))/100", "name": "competitor_price_per_minute", "group": "Ungrouped variables", "description": "

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

"}}, "ungrouped_variables": ["hours", "block_price_per_hour", "single_price_per_hour", "competitor_price_per_minute", "marking_matrix", "prices", "best_method"], "extensions": ["random_person"], "variable_groups": [{"name": "Person", "variables": ["person", "pronouns", "name", "verbs"]}], "rulesets": {}, "name": "David's copy of Using compound units - room hire price per hour and per minute", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "preamble": {"css": "", "js": ""}, "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "David Rickard", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/451/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "David Rickard", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/451/"}]}