// Numbas version: finer_feedback_settings {"name": "Rates", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Rates", "tags": ["conversion", "converting", "rates", "unit", "unitary"], "metadata": {"description": "

Unit rates and converting rates.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"firstunit": {"name": "firstunit", "group": "part c", "definition": "if(seed[0]='cap',random([\"millilitre\",\"kilolitre\",1000000],[\"millilitre\",\"megalitre\",1000000000]),\nif(seed[0]='mass',random([\"gram\",\"tonne\",1000000],[\"milligram\",\"tonne\",1000000000],[\"milligram\",\"kilogram\",1000000]),\nif(seed[0]='time',random([\"millisecond\",\"hour\",3600000],[\"minute\",\"day\",1440],[\"second\",\"day\",86400],[\"millisecond\",\"day\",24*3600000]),\nif(seed[0]='distance',random([\"millimetre\",\"kilometre\", 1000000], [\"centimetre\", \"kilometre\",100000],[\"millimetre\",\"metre\",1000]),'error'))))", "description": "", "templateType": "anything", "can_override": false}, "num1": {"name": "num1", "group": "part c", "definition": "random(5..45)", "description": "", "templateType": "anything", "can_override": false}, "num2": {"name": "num2", "group": "part c", "definition": "random(5..45 except num1)", "description": "", "templateType": "anything", "can_override": false}, "distance": {"name": "distance", "group": "fuel", "definition": "if(vehicle='car',random(400..650),if(vehicle='motorbike',random(210..375),'error'))", "description": "", "templateType": "anything", "can_override": false}, "number": {"name": "number", "group": "Ungrouped variables", "definition": "random(2..100)", "description": "", "templateType": "anything", "can_override": false}, "thing": {"name": "thing", "group": "Ungrouped variables", "definition": "random([['eats','eating','watermelons'],['eats','eating','pies'],['eats','eating','apples'],['eats','eating','grapes'],['eats','eating','sultanas'],['eats','eating','pickles'],['eats','eating','berries'],['serves', 'serving','tennis balls'],['bowls', 'bowling','cricket balls'],['mows', 'mowing','lawns'],['runs', 'running','kilometres'],['rides', 'riding','kilometres'],['writes', 'writing','lines of code'],['reads', 'reading','pages'],['reads', 'reading','books'],['buys','buying','unnecessary things off the internet'],['buys','buying','collectables'],['buys','buying','star wars figurines'],['buys','buying','movies'],['throws out','throwing out','pieces of scribble paper'],['plays','playing','games of football'],['plays','playing','games of quidditch']])", "description": "

plural, singular, object

", "templateType": "anything", "can_override": false}, "amount": {"name": "amount", "group": "fuel", "definition": "if(vehicle='car',random(35..60),if(vehicle='motorbike',random(11..20),'error'))", "description": "", "templateType": "anything", "can_override": false}, "person": {"name": "person", "group": "Ungrouped variables", "definition": "Random(['Aaron', 'Alex', 'Ben', 'Claire', 'Charlotte', 'Daniel', 'Deb', 'Ethan', 'Elizabeth', 'Grace', 'Hunter', 'Julia', 'Isaac', 'Xavier', 'Victoria', 'Sophie', 'Abbey', 'Annie', 'Noah'])", "description": "", "templateType": "anything", "can_override": false}, "niceamount": {"name": "niceamount", "group": "fuel", "definition": "random(list(10..50#5) except amount)", "description": "", "templateType": "anything", "can_override": false}, "nicedistance": {"name": "nicedistance", "group": "fuel", "definition": "random(list(50..200#10))", "description": "", "templateType": "anything", "can_override": false}, "vehicle": {"name": "vehicle", "group": "fuel", "definition": "random(['car','motorbike'])", "description": "", "templateType": "anything", "can_override": false}, "integer": {"name": "integer", "group": "Ungrouped variables", "definition": "random(2..12)", "description": "", "templateType": "anything", "can_override": false}, "secondunit": {"name": "secondunit", "group": "part c", "definition": "if(seed[1]='cap',random([\"millilitre\",\"kilolitre\",1000000],[\"millilitre\",\"megalitre\",1000000000]),\nif(seed[1]='mass',random([\"gram\",\"tonne\",1000000],[\"milligram\",\"tonne\",1000000000],[\"milligram\",\"kilogram\",1000000]),\nif(seed[1]='time',random([\"millisecond\",\"hour\",3600000],[\"minute\",\"day\",1440],[\"second\",\"day\",86400],[\"millisecond\",\"day\",24*3600000]),\nif(seed[1]='distance',random([\"millimetre\",\"kilometre\", 1000000], [\"centimetre\", \"kilometre\",100000],[\"millimetre\",\"metre\",1000]),'error'))))", "description": "", "templateType": "anything", "can_override": false}, "seed": {"name": "seed", "group": "part c", "definition": "shuffle(['cap','time','mass','distance'])[0..2]", "description": "", "templateType": "anything", "can_override": false}, "unit": {"name": "unit", "group": "Ungrouped variables", "definition": "random(['hour', 'minute', 'day', 'month'])", "description": "", "templateType": "anything", "can_override": false}, "temp": {"name": "temp", "group": "part c", "definition": "num1*secondunit[2]/(num2*firstunit[2])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["person", "number", "integer", "unit", "thing"], "variable_groups": [{"name": "fuel", "variables": ["vehicle", "distance", "amount", "nicedistance", "niceamount"]}, {"name": "part c", "variables": ["firstunit", "seed", "secondunit", "num1", "num2", "temp"]}], "functions": {}, "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": "

{person} {thing[0]} {number} {thing[2]} per {integer} {unit}s. This is equivalent to {thing[1]} [[0]] {thing[2]} per {unit}.

\n

Note: If the answer has many decimal places leave your answer as a fraction (using / as the fraction bar) so that your answer is exact (and not an approximation/rounded-answer)

", "stepsPenalty": 0, "steps": [{"type": "information", "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": "

The word 'per' can be replaced with the operation of division.

\n

These questions are very similar to equivalent fractions.

\n

\n
\n

\n

Suppose you are told 'Daniel eats 61 berries per 3 hours'. The following three methods are equivalent but might appear different.

\n
    \n
  1. We are given 61 berries / 3 hours. Divide both sides of the rate by 3 (so that we are dealing with 'per hour' not 'per 3 hours'). This gives 61/3 berries/hour.
  2. \n

  3. \\[\\text{61 berries/3 hours}=\\frac{61\\text{ berries}}{3 \\text{ hours}}=\\frac{61}{3}\\frac{\\text{berries}}{\\text{hour}}=\\frac{61}{3} \\,\\text{berries/hour}.\\]
  4. \n

  5. \\[\\text{61 berries/3 hours}=\\frac{61\\text{ berries}}{3 \\text{ hours}}=\\frac{61\\text{ berries }\\div 3}{3 \\text{ hours }\\div 3}=\\frac{61\\div 3\\text{ berries }}{1 \\text{ hour }}=\\frac{61}{3} \\,\\text{berries/hour}.\\]
  6. \n
\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": "{number}/{integer}", "maxValue": "{number}/{integer}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": 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 {vehicle} travels {distance} km per {amount} L of petrol.  

\n

\n

How many kilometres can be travelled by using {niceamount} L? [[1]] km

\n

How many litres of petrol are needed to travel {nicedistance} km? [[0]] L

\n

\n

Note: If the answer has many decimal places leave your answer as a fraction (using / as the fraction bar) so that your answer is exact (and not an approximation/rounded-answer)

", "stepsPenalty": 0, "steps": [{"type": "information", "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": "

Just like a fraction, we can multiply or divide both sides of the rate by any number (except 0).

\n

\n
\n

\n

Suppose you have 'a motorbike travels 245 km per 13 L of petrol'. Note, this can be written as 245 km / 13 L.

\n

To determine kilometres per 20 L, first determine how many kilometres per 1 L, and then multiply by 20. That is, 

\n

245 km / 13  L  = $\\frac{345}{13}$ km/L =  $\\frac{345}{13}\\times 20$ km / 20 L.

\n

To determine litres per 50 km, first determine how many litres per 1 km, and then multiply by 50. That is,

\n

245 km / 13 L = 1 km / $\\frac{13}{245}$ L = 50 km / $\\frac{13}{245}\\times 50$ L.

\n

\n
\n

\n

Note, 245 km per 13 L could also be written as 13 L / 245 km. It might be simpler to do the second question this way:

\n

 To determine litres per 50 km, first determine how many litres per 1 km, and then multiply by 50. That is,

\n

13 L / 245 km = $\\frac{13}{245}$ L / km = $\\frac{13}{245}\\times 50$ L / 50 km.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{amount}*{nicedistance}/{distance}", "answerSimplification": "all", "showPreview": false, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{distance}/{amount}*{niceamount}", "answerSimplification": "all", "showPreview": false, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "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 rate of {num1} {firstunit[0]}s / {num2} {secondunit[0]}s is equivalent to [[0]] {firstunit[1]}s / {secondunit[1]}.

\n

\n

Note: If the answer has many decimal places leave your answer as a fraction (using / as the fraction bar) so that your answer is exact (and not an approximation/rounded-answer)

", "stepsPenalty": 0, "steps": [{"type": "information", "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": "

Just like a fraction, we can multiply or divide both sides of the rate by any number (except 0). Do one thing at a time to avoid making a mistake.

\n

\n
\n

\n

For example, suppose we need to convert 24 milliseconds / 4 litres into an equivalent rate in minutes / kilolitre. We need to do the following steps:

\n
    \n
  1. convert milliseconds to minutes,
  2. \n
  3. convert litres to kilolitres,
  4. \n
  5. make it per kilolitre. 
  6. \n
\n

\n
\n

\n
    \n
  1. There are 60,000 milliseconds in a minute so to convert from millisecond to minutes we divide the milliseconds by 60,000. We now have 0.0004 minutes / 4 litres.
  2. \n
  3. There are 1,000 litres in a kilolitre so to convert from litres to kilolitres, you need to divide the litres by 1,000. We now have 0.0004 minutes / 0.004 litres. 
  4. \n
  5. To make it per litre we recall that 0.0004 minutes / 0.004 litres is equivalent to 0.0004/0.004 minutes / litre (this is the same as dividing both sides by 0.004). 
  6. \n
\n

So our final answer is 0.1 minutes / litre.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{num1}*{secondunit[2]}/({num2}*{firstunit[2]})", "answerSimplification": "all", "showPreview": false, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}