// Numbas version: exam_results_page_options {"name": "Average Speed of Long-haul Flight", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Average Speed of Long-haul Flight", "tags": [], "metadata": {"description": "

Calculate the average speed in km/h and m/s given distance in kilometres and time in hours and minutes.

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

One of the longest commercial passenger flights in the world is that from {cities}, a distance of {distance} km. The flight is operated by {airline} and has a scheduled flight time of {timeh} h and {timem} m.

", "advice": "

We are told that the distance is {distance} km and that the time taken is {timeh} h and {timem} m.

\n

We know that 1 km $=$ 1000 m, therefore this is equal to a distance of {distance*1000} m and a time of {dpformat(timeh+timem/60,3)} h (since {timem} m is equal to {precround(timem/60,3)} h).

\n

\\[\\text{Average speed} = \\frac{\\text{Distance travelled}}{\\text{Total time taken}}.\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"flights": {"name": "flights", "group": "Flight Data", "definition": "json_decode(safe(\"[\\n {\\n \\\"cities\\\": \\\"Singapore (SIN) to New York (JFK)\\\",\\n \\\"distance\\\": 15326,\\n \\\"timehours\\\": 18,\\n \\\"timemins\\\": 50,\\n \\\"airline\\\": \\\"Singapore Airlines\\\"\\n },\\n {\\n \\\"cities\\\": \\\"Singapore (SIN) to Newark (EWR)\\\",\\n \\\"distance\\\": 15326,\\n \\\"timehours\\\": 18,\\n \\\"timemins\\\": 45,\\n \\\"airline\\\": \\\"Singapore Airlines\\\"\\n },\\n {\\n \\\"cities\\\": \\\"Perth (PER) to London (LHR)\\\",\\n \\\"distance\\\": 14500,\\n \\\"timehours\\\": 17,\\n \\\"timemins\\\": 15,\\n \\\"airline\\\": \\\"Qantas\\\"\\n },\\n {\\n \\\"cities\\\": \\\"Melbourne (MEL) to Dallas (DFW)\\\",\\n \\\"distance\\\": 14471,\\n \\\"timehours\\\": 17,\\n \\\"timemins\\\": 35,\\n \\\"airline\\\": \\\"Qantas\\\"\\n },\\n {\\n \\\"cities\\\": \\\"Auckland (AKL) to New York (JFK)\\\",\\n \\\"distance\\\": 14207,\\n \\\"timehours\\\": 17,\\n \\\"timemins\\\": 50,\\n \\\"airline\\\": \\\"Air New Zealand\\\"\\n },\\n {\\n \\\"cities\\\": \\\"Dubai (DXB) to Auckland (AKL)\\\",\\n \\\"distance\\\": 14201,\\n \\\"timehours\\\": 17,\\n \\\"timemins\\\": 10,\\n \\\"airline\\\": \\\"Emirates\\\"\\n },\\n {\\n \\\"cities\\\": \\\"Singapore (SIN) to Los Angeles (LAX)\\\",\\n \\\"distance\\\": 14114,\\n \\\"timehours\\\": 17,\\n \\\"timemins\\\": 50,\\n \\\"airline\\\": \\\"Singapore Airlines\\\"\\n },\\n {\\n \\\"cities\\\": \\\"Bangalore (BLR) to San Francisco (SFO)\\\",\\n \\\"distance\\\": 14003,\\n \\\"timehours\\\": 17,\\n \\\"timemins\\\": 40,\\n \\\"airline\\\": \\\"Air India\\\"\\n },\\n {\\n \\\"cities\\\": \\\"Darwin (DRW) to London (LHR)\\\",\\n \\\"distance\\\": 13873,\\n \\\"timehours\\\": 17,\\n \\\"timemins\\\": 55,\\n \\\"airline\\\": \\\"Qantas\\\"\\n },\\n {\\n \\\"cities\\\": \\\"Houston (IAH) to Sydney (SYD)\\\",\\n \\\"distance\\\": 13834,\\n \\\"timehours\\\": 17,\\n \\\"timemins\\\": 35,\\n \\\"airline\\\": \\\"United Airlines\\\"\\n }\\n]\"))", "description": "", "templateType": "json", "can_override": false}, "flight": {"name": "flight", "group": "Chosen Flight", "definition": "random(flights)", "description": "", "templateType": "anything", "can_override": false}, "cities": {"name": "cities", "group": "Chosen Flight", "definition": "flight[\"cities\"]", "description": "", "templateType": "anything", "can_override": false}, "distance": {"name": "distance", "group": "Chosen Flight", "definition": "flight[\"distance\"]", "description": "", "templateType": "anything", "can_override": false}, "timeh": {"name": "timeh", "group": "Chosen Flight", "definition": "flight[\"timehours\"]", "description": "", "templateType": "anything", "can_override": false}, "timem": {"name": "timem", "group": "Chosen Flight", "definition": "flight[\"timemins\"]", "description": "", "templateType": "anything", "can_override": false}, "airline": {"name": "airline", "group": "Chosen Flight", "definition": "flight[\"airline\"]", "description": "", "templateType": "anything", "can_override": false}, "kilometres": {"name": "kilometres", "group": "Ungrouped variables", "definition": "distance", "description": "", "templateType": "anything", "can_override": false}, "speed": {"name": "speed", "group": "Ungrouped variables", "definition": "precround(distance/(timeh+timem/60),3)", "description": "", "templateType": "anything", "can_override": false}, "speedkmh": {"name": "speedkmh", "group": "Ungrouped variables", "definition": "precround(distance/(timeh+precround(timem/60,3)),0)", "description": "", "templateType": "anything", "can_override": false}, "speedms": {"name": "speedms", "group": "Ungrouped variables", "definition": "precround((distance*1000)/(timeh*60*60+timem*60),0)", "description": "", "templateType": "anything", "can_override": false}, "convertedspeedkmh": {"name": "convertedspeedkmh", "group": "Ungrouped variables", "definition": "precround(speedkmh/3.6,0)", "description": "", "templateType": "anything", "can_override": false}, "speedkmhshort": {"name": "speedkmhshort", "group": "Ungrouped variables", "definition": "precround(kilometres/(timeh+precround(timem/60,1)),0)", "description": "", "templateType": "anything", "can_override": false}, "convertedspeedkmhshort": {"name": "convertedspeedkmhshort", "group": "Ungrouped variables", "definition": "precround(speedkmhshort/3.6,0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "speedkmh<>speedkmhshort", "maxRuns": "1000"}, "ungrouped_variables": ["kilometres", "speed", "speedkmh", "speedms", "convertedspeedkmh", "speedkmhshort", "convertedspeedkmhshort"], "variable_groups": [{"name": "Flight Data", "variables": ["flights"]}, {"name": "Chosen Flight", "variables": ["flight", "cities", "distance", "timeh", "timem", "airline"]}], "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": "

Calculate the average speed of the aircraft, in kilometres per hour.

\n

[[0]] km/h         Round your answer to the nearest whole number.

", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": true, "customName": "Formula Hint", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Speed, distance and time are related by the equation

\n

\\[\\text{Average speed} = \\frac{\\text{Distance travelled}}{\\text{Total time taken}}.\\]

\n

Make sure your distance and time values use the appropriate units to produce a value for speed with units of km/h.

"}], "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "KMH", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "min(speedkmh,speedkmhshort)", "maxValue": "max(speedkmh,speedkmhshort)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "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": "

What is the average speed of the aircraft in metres per second?

\n

[[0]] m/s     Round your answer to the nearest whole number.

", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": true, "customName": "Formula Hint", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Speed, distance and time are related by the equation

\n

\\[\\text{Average speed} = \\frac{\\text{Distance travelled}}{\\text{Total time taken}}.\\]

\n

Make sure your distance and time values use the appropriate units to produce a value for speed with units of m/s.

"}], "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "MS", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "min([speedms,convertedspeedkmh,convertedspeedkmhshort])", "maxValue": "max([speedms,convertedspeedkmh,convertedspeedkmhshort])", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "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/"}, {"name": "David Rickard", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/451/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}]}]}], "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/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}]}