// Numbas version: finer_feedback_settings {"name": "Cost for a journey", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["distancemiles", "mpg", "costperlitre", "totalcost", "litrespergallon"], "name": "Cost for a journey", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

See step.

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

You're planning a trip with a group of friends.  How much will it cost (to the nearest pound) if:

\n \n

Answer: total cost is £ [[0]] (to the nearest pound)

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

Driving {distanceMiles} miles at {mpg} miles per gallon will use:  $\\frac {\\var{distanceMiles}} {\\var{mpg}}$  gallons.

\n

If  1  gallon  =  {litresPerGallon}  litres,  that  will  use  $\\frac {\\var{distanceMiles}\\times \\var{litresPerGallon}} { \\var{mpg}}$  litres.

\n

And  if  1  litre  costs  £{costPerLitre},  that  will  cost  £$\\frac {\\var{distanceMiles}\\times \\var{litresPerGallon}\\times \\var{costPerLitre}} { \\var{mpg}}$.

\n

Round  your  answer  to  the  nearest  pound.

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"integerPartialCredit": 0, "integerAnswer": true, "allowFractions": false, "variableReplacements": [], "maxValue": "{totalCost}", "minValue": "{totalCost}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "

Practice of a type of QTS question.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"distancemiles": {"definition": "random(2..5)*30", "templateType": "anything", "group": "Ungrouped variables", "name": "distancemiles", "description": ""}, "mpg": {"definition": "random(4..10)*5", "templateType": "anything", "group": "Ungrouped variables", "name": "mpg", "description": ""}, "costperlitre": {"definition": "random(1..99)*0.01+1", "templateType": "anything", "group": "Ungrouped variables", "name": "costperlitre", "description": ""}, "totalcost": {"definition": "precround(distanceMiles*litresPerGallon*costPerLitre/mpg,0)", "templateType": "anything", "group": "Ungrouped variables", "name": "totalcost", "description": ""}, "litrespergallon": {"definition": "4.546", "templateType": "anything", "group": "Ungrouped variables", "name": "litrespergallon", "description": ""}}, "metadata": {"description": "

Basic calculation exercise using distance, mpg and cost per litre (with the conversion factor for gallons to litres given).

\n


Based on a generic test QTS question.

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