// Numbas version: finer_feedback_settings {"name": "BLDG1022 Resources", "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": true, "shuffleQuestionGroups": false, "showstudentname": false, "question_groups": [{"name": "Intro", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [""], "variable_overrides": [[]], "questions": [{"name": "Numbas Introduction", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "
This module covers the topics Units, Trigonometry and Vectors, which form the mathematical background for BLDG1022. These modules are optional and can be completed at your own pace. You have unlimited attempts on all questions.
\nAs part of the UNSW Numeracy Project, similar modules are currently being developed covering many different numeracy and mathematics skills. You are some of the first students to try these modules, so any and all feedback about them is greatly appreciated! You will have access to a survey soon where you can provide feedback.
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "These modules will be in the form of questions of varying types.
\nSome boxes will require you to type in a number, such as $1+3=$ [[0]].
\nFor some expressions you will need a calculator. Answering to within one or two decimal places will suffice. For example, use a calculator to find $22/7=$ [[1]].
\n\n", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "sum", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "4", "maxValue": "4", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "div", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "22/7-0.1", "maxValue": "22/7+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Other questions will get you to fill in blanks, tick boxes or complete other activities. [[0]]
\nIn the Vectors module, some of your answers will be in the form of vectors. You can type the vector $\\begin{pmatrix}3\\\\5\\end{pmatrix}$ as vector(3,5).
Type the vector $\\begin{pmatrix}7\\\\2\\end{pmatrix}$ here: [[1]]. You should see it appear as you type.
\n\n\n", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "understand", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["I understand."], "matrix": ["1"], "distractors": [""]}, {"type": "jme", "useCustomName": true, "customName": "vec", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "vector(7,2)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "valuegenerators": [], "functionsets": ["arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}]}, {"name": "Units", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], []], "questions": [{"name": "Units and measurements", "extensions": [], "custom_part_types": [], "resources": ["question-resources/measurements.svg", "question-resources/charger.svg", "question-resources/cake.svg"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "A measurement is comprised of a value and a unit. For example,
\n\"The car is travelling at $80\\,\\mathrm{km}/\\mathrm{hr}$.\"
\nis a measurement which has a value of $80$ and units of kilometres per hour ($\\mathrm{km}/\\mathrm{hr}$).
\n{image('resources/question-resources/measurements.svg', 20)}
\nTwo units have the same type if they are used to measure the same kind of thing. Metres $(\\mathrm{m})$, feet ($\\mathrm{ft}$), centimetres ($\\mathrm{cm}$) and angstroms ($\\AA$) are all units of length, because they are used to measure the length of an object.
\nSome units, like $\\mathrm{km}/\\mathrm{hr}$, are compound units which are created by multiplying or dividing other types of units. We use the word \"per\" when reading divided units, so speed is measured in \"kilometres per hour\". Other examples include $\\mathrm{m}^2$ metres squared for area, and $\\mathrm{kg}\\,\\mathrm m/\\mathrm s^2$ kilogram metres per second squared for force.
\"My laptop requires an $80\\,\\mathrm{W}$ charger\"
\n{image('resources/question-resources/charger.svg',2)}
\nis a statement about a measurement with a value of [[0]] and units of [[1]].
\nThis is a measurement of [[2]].
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "value", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "80", "maxValue": "80", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "unit", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["Newtons", "centimetres", "Watts", "seconds"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "type", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["force", "length", "power", "time"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "\"This birthday cake costs \\$35\"
\n{image('resources/question-resources/cake.svg',2.5)}
\nis a measurement with a value of [[0]] and units of [[1]].
\nUnits of the same type as this one are used to express measurements of [[2]].
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "value", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "35", "maxValue": "35", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "unit", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["Joules", "degrees Celcius", "metres per second", "dollars"], "matrix": [0, 0, "0", "1"], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "type", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["energy", "temperature", "speed", "monetary value"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Select the correct type for each unit.
", "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": false, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "interpretedAnswerForm": "list of list of boolean", "choices": ["kilometres ($\\mathrm{km}$)", "years ($\\mathrm{yr}$)", "kilometres per hour ($\\mathrm{km}/\\mathrm{h}$)", "litres ($\\mathrm{L}$)", "centimetres cubed ($\\mathrm{cm}^3$)", "feet per second ($\\mathrm{ft}/\\mathrm{s}$)", "lightyears ($\\mathrm{ly}$)", "metres squared ($\\mathrm{m}^2$)"], "matrix": [["1", "0", 0, 0, 0], [0, 0, 0, "1", 0], [0, 0, 0, 0, "1"], [0, 0, "1", 0, 0], [0, 0, "1", 0, 0], [0, 0, 0, 0, "1"], ["1", 0, 0, 0, 0], [0, "1", 0, 0, 0]], "layout": {"type": "all", "expression": ""}, "answers": ["length", "area", "volume", "time", "speed"], "choicesHeader": "", "answersHeader": ""}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Unit conversions", "extensions": ["jsxgraph", "quantities"], "custom_part_types": [{"source": {"pk": 7, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/7/edit"}, "name": "Quantity with units", "short_name": "quantity", "description": "The student enters a quantity with units.
", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nunits(correct_quantity)*abs(eval(settings[\"wiggle\"]))\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "The scalar part of the student's quantity
", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "The units of the student's quantity, before converting.
", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "The units of the student's quantity.
\nIf the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.
", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "The student's answer, interpreted as a quantity.
\nMarking fails if the student does not enter a valid quantity.
", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "Are the units of the student's quantity compatible with the units of the expected quantity?
", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "/Are the student's quantity and the expected quantity in exactly the same units?
", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.
", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "Is the student's quantity within the allowed tolerance of the expected answer?
", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "units(correct_quantity)*abs(eval(settings[\"wiggle\"]))"}, {"name": "valid_number", "description": "Is the scalar part of the student's answer a valid number?
", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units:The student enters a quantity with units. Answer accepted as correct within range defined as percentage of expected answer.
", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])+\" to \"+string(settings[\"wiggle\"])+\"% accuracy\"\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nabs(eval(settings[\"wiggle\"]))*0.01*abs(settings[\"correctAnswer\"])\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "The scalar part of the student's quantity
", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "The units of the student's quantity, before converting.
", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "The units of the student's quantity.
\nIf the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.
", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "The student's answer, interpreted as a quantity.
\nMarking fails if the student does not enter a valid quantity.
", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "Are the units of the student's quantity compatible with the units of the expected quantity?
", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "/Are the student's quantity and the expected quantity in exactly the same units?
", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.
", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "Is the student's quantity within the allowed tolerance of the expected answer?
", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "abs(eval(settings[\"wiggle\"]))*0.01*abs(settings[\"correctAnswer\"])"}, {"name": "valid_number", "description": "Is the scalar part of the student's answer a valid number?
", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units:There are many situations in which measurements in one unit can be converted to another, by exchanging each of one unit for some amount of the other according to the conversion rate.
\nFor example, metres ($\\mathrm{m}$) and feet ($\\mathrm{ft}$) are both units of length, with $$1\\,\\mathrm{m}=3.28\\,\\mathrm{ft}.$$
\n{image('resources/question-resources/tapemeasure.svg',10)}
\nThis is an equation, because both sides represent the same length. To make unit conversions, we multiply or divide by the same amount on both sides. Multiplying by $100$ on both sides gives
$$\\begin{align*}
100\\cdot (1\\,\\mathrm{m})&=100\\cdot (3.28\\,\\mathrm{ft})\\\\
\\Rightarrow 100\\,\\mathrm{m}&=328\\,\\mathrm{ft}.
\\end{align*}$$
If we want to find the number of metres in a certain number of feet, we can start by dividing both sides by $3.28$ to give
$$\\dfrac{1\\,\\mathrm{m}}{3.28}=\\dfrac{3.28\\,\\mathrm{ft}}{3.28}$$
so $0.31\\,\\mathrm{m}=1\\,\\mathrm{ft}$. Multiplying both sides by $6$ then gives
$$6\\,\\mathrm{ft}=6(0.31\\,\\mathrm{m})=1.86\\,\\mathrm{m}.$$
Unit conversion can also happen between different types of units. For example, when buying fabric at a craft store you are often quoted prices like \"\\$25 for each square metre\" which describes a unit conversion between monetary value and area.
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"conversion": {"name": "conversion", "group": "Ungrouped variables", "definition": "jsxgraph(\n 600, 120, [-1.2,1,12,-1.6], \n map(['segment', [[i,0],[i,0.2]], [\"fixed\":true,\"highlight\":false]],\n i, 0..10) + \n map(['text', [i,0.5,string(i)], [\"fontSize\":18, \"anchorX\":\"middle\", \"fixed\":true,\"highlight\":false] ],\n i, 0..10) + \n map(['segment', [[2.54*i,0],[2.54*i,-0.2]], [\"fixed\":true,\"highlight\":false]],\n i, 0..4) + \n map(['text', [2.54*i,-0.5,string(i)], [\"fontSize\":18, \"anchorX\":\"middle\",\"fixed\":true,\"highlight\":false] ],\n i, 0..4) + \n [\n ['text', [-0.5,0.5,\"cm\"], [\"fontSize\":18, \"anchorX\":\"right\",\"fixed\":true,\"highlight\":false] ],\n ['text', [-0.5,-0.5,\"in\"], [\"fontSize\":18, \"anchorX\":\"right\",\"fixed\":true,\"highlight\":false] ],\n ['arrow', [[0,0],[11,0]], [\"fixed\":true,\"highlight\":false] ],\n ['slider', [[0,0],[10.5,0],[0,0,10.5]], \n [\"id\":\"measure\",\"withTicks\":false,\n \"highline\":[\"opacity\":1],\n \"baseline\":[\"opacity\":0,\"highlight\":false]] ]\n ] +\n [['text', [5.5,-1.2,\"Conversion between cm and in\"], [\"fontSize\":18, \"anchorX\":\"middle\"]]]\n ,\n \n [\"axis\":false, \"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n )", "description": "Interactive diagram of a ruler which converts centimetres to inches
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["conversion"], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "A pint is a measure of volume usually associated with buying drinks. We have the conversion $$1\\,\\mathrm{pt}=0.425\\,\\mathrm{L}.$$
\n{image('resources/question-resources/beer.svg',8)}
\nTo find the number of litres in $6$ pints, we [[0]] both sides by $6$ to get $6\\,\\mathrm{pt}=$ [[1]] $\\mathrm{L}$. Similarly, $24$ pints is equal to [[2]].
\nOn the other hand, to determine the number of pints in a litre, we [[3]] by $0.425$ on both sides of the conversion equation. This gives [[4]] $\\mathrm{pt}=1\\,\\mathrm{L}$.
\nAn Olympic-sized swimming pool is $3,125,000\\,\\mathrm{L}$, which measured in pints is [[5]].
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "conv1", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["multiply", "divide", "subtract"], "matrix": ["1", 0, 0], "distractors": ["", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "L1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "6*0.425-0.1", "maxValue": "6*0.425+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "quantity", "useCustomName": true, "customName": "L2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(24*0.425,\"L\")", "hint": "remind units", "allow_unitless": false, "incompatible_units_action": "incorrect", "different_units_action": "incorrect", "different_units_penalty": "100", "wiggle": "10^-12"}}, {"type": "1_n_2", "useCustomName": true, "customName": "conv2", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["multiply", "divide", "subtract"], "matrix": ["0", "1", 0], "distractors": ["", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "pt1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "1/0.425-0.1", "maxValue": "1/0.425+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "quantity-with-units-relative-tolerance", "useCustomName": true, "customName": "pt2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(7352941.17, \"pt\")", "hint": "remind units", "allow_unitless": false, "incompatible_units_action": "incorrect", "different_units_action": "incorrect", "different_units_penalty": "100", "wiggle": "10"}}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "The density of concrete is approximately $2400\\,\\mathrm{kg}/\\mathrm{m}^3$. This means that when working with concrete, we can make the unit conversion $$1\\,\\mathrm{m}^3=2400\\,\\mathrm{kg}.$$
\nIf a garden bed requires a volume of $0.72\\,\\mathrm{m}^3$ of concrete, this will weigh [[0]].Write your answer in $\\mathrm{kg}$.
\nIf a truck can carry $50,000\\,\\mathrm{kg}$ of concrete, then the volume of the truckbed is [[1]].Write your answer in $\\mathrm{m}$^$3$.
", "gaps": [{"type": "quantity", "useCustomName": true, "customName": "vol", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(1728,\"kg\")", "hint": "none", "allow_unitless": true, "incompatible_units_action": "prevent", "different_units_action": "prevent", "different_units_penalty": "100", "wiggle": "10^-12"}}, {"type": "quantity", "useCustomName": true, "customName": "mass", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(20.83,\"m^3\")", "hint": "none", "allow_unitless": true, "incompatible_units_action": "prevent", "different_units_action": "prevent", "different_units_penalty": "100", "wiggle": "10^-1"}}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Suppose you can run $5$ kilometres in $27$ minutes, which we write as the unit conversion $$5\\,\\mathrm{km}=27\\,\\mathrm{min}.$$
Assume you can continue to run at this pace indefinitely.
How long does it take to run $1\\,\\mathrm{km}$? [[0]]
\nHow far can you run in an hour? [[1]]
\nHow many hours would it take you to run a marathon ($42\\,\\mathrm{km}$)? [[2]]
(Hint: since the question asks 'how many hours', you don't need units here!)
When describing measurements which are very large or very small, we attach a prefix to the unit which includes a scaling factor by a power of $10$. For example, the prefix kilo ($\\mathrm{k}$) represents $10^3$ or $1000$. This means that one kilometre ($\\mathrm{km}$) is equal to $1000$ metres ($\\mathrm{m}$).
\nHere is a table of common prefixes.
\n| Name | \nSymbol | \nPower of 10 | \nAmount | \n
| tera | \n$\\mathrm{T}$ | \n$12$ | \ntrillion | \n
| giga | \n$\\mathrm{G}$ | \n$9$ | \nbillion | \n
| mega | \n$\\mathrm{M}$ | \n$6$ | \nmillion | \n
| kilo | \n$\\mathrm{k}$ | \n$3$ | \nthousand | \n
| milli | \n$\\mathrm{m}$ | \n$-3$ | \nthousandth | \n
| micro | \n$\\mu$ | \n$-6$ | \nmillionth | \n
A basic USB drive holds $16$ gigabytes of information, or $16\\,\\mathrm{GB}$. This is $16\\times 10^{9}\\,\\mathrm{B}$, or $16$ billion bytes. Writing this value out in full is $16,000,000,000$. Each power of $10$ adds a new zero to the number.
\nTo familiraise yourself with these powers in terms of length, check out the website Size of Life which shows the size of various living organisms on this scale. For example, red blood cells are about $8$ micrometres wide. For scales of other measurments, see the Wikipedia page Orders of Magnitude.
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Each kilometre is [[0]] metres, and so $5\\,\\mathrm{km}=$ [[1]] $\\mathrm{m}$.
\nThe Murray-Darling has a volume of $12\\,\\mathrm{TL}$, which is [[2]] litres.
(Hint: every power of 10 adds another digit to the number).
Flashlight batteries require a voltage of approximately $1500\\,\\mathrm{mV}$, which is equal to [[3]] volts.
\n", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "m1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "1000", "maxValue": "1000", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "m2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "5000", "maxValue": "5000", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "L1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "12*10^{12}", "maxValue": "12*10^{12}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "v1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "1.5", "maxValue": "1.5", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "To simplify a unit expression, we choose the largest prefix where the value of the expression is at least $1$ (so not purely a decimal).
\nFor example, the Saturn V rocket which carried the Apollo 11 capsule to the moon had a thrust of $35$ million Newtons, or $35,000,000\\,\\mathrm{N}$.
\nExpressed in $\\mathrm{kN}$, this is [[0]] $\\mathrm{kN}$.
\nExpressed in $\\mathrm{MN}$, this is [[1]] $\\mathrm{MN}$.
\nExpressed in $\\mathrm{GN}$, this is [[2]] $\\mathrm{GN}$.
\nWhich of these unit expressions is most simplified? [[3]].
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "kN", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "35000", "maxValue": "35000", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "MN", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "35", "maxValue": "35", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "GN", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "0.035", "maxValue": "0.035", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "simple", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["The expression in $\\mathrm{N}$", "The expression in $\\mathrm{kN}$", "The expression in $\\mathrm{MN}$", "The expression in $\\mathrm{GN}$"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "How many kilometres are in $340,000\\,\\mathrm{mm}$? [[0]]
(Hint: first convert to metres)
How many milliamps ($\\mathrm{mA}$) is a current of $0.0088\\,\\mathrm{MA}$? [[1]]
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "km", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "0.34", "maxValue": "0.34", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "mA", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "8800000", "maxValue": "8800000", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Adding and subtracting units", "extensions": ["quantities"], "custom_part_types": [{"source": {"pk": 7, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/7/edit"}, "name": "Quantity with units", "short_name": "quantity", "description": "The student enters a quantity with units.
", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nunits(correct_quantity)*abs(eval(settings[\"wiggle\"]))\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "The scalar part of the student's quantity
", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "The units of the student's quantity, before converting.
", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "The units of the student's quantity.
\nIf the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.
", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "The student's answer, interpreted as a quantity.
\nMarking fails if the student does not enter a valid quantity.
", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "Are the units of the student's quantity compatible with the units of the expected quantity?
", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "/Are the student's quantity and the expected quantity in exactly the same units?
", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.
", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "Is the student's quantity within the allowed tolerance of the expected answer?
", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "units(correct_quantity)*abs(eval(settings[\"wiggle\"]))"}, {"name": "valid_number", "description": "Is the scalar part of the student's answer a valid number?
", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units:We can only add or subtract measurements with the same type of unit. For example, if a wall has a height of $2.7\\,\\mathrm{m}$ and we add a roof with a height of $90\\,\\mathrm{cm}$, then the total height of the structure is $$2.7\\,\\mathrm{m}+90\\,\\mathrm{cm}=2.7\\,\\mathrm{m}+0.9\\,\\mathrm{m}=3.6\\,\\mathrm{m}.$$
\nNotice that we converted both measurements to the same units before adding, and then added the values of the measurements together. The same process happens for subtraction.
\n(If you have experience with algebra, this process is similar to combining like terms, so adding $2.7x$ and $0.9x$ gives $2.7x+0.9x=3.6x$.)
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Mixing $25\\,\\mathrm{L}$ of dry concrete mix with $2500\\,\\mathrm{mL}$ of water gives a total mixture volume of [[0]]
", "gaps": [{"type": "quantity", "useCustomName": true, "customName": "vol", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(27.5,\"L\")", "hint": "remind units", "allow_unitless": false, "incompatible_units_action": "prevent", "different_units_action": "convert", "different_units_penalty": "100", "wiggle": "10^-1"}}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Using the conversion $1\\,\\mathrm{in}=2.54\\,\\mathrm{cm}$: a room is drafted to be $4.12\\,\\mathrm{m}$ long, and three windows will be installed which are each $18\\,\\mathrm{in}$ wide. The total width of the windows is [[0]] $\\mathrm{cm}$, and so the width of the wall (excluding the windows) is [[1]] $\\mathrm{m}$.
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "windows", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "45.72-0.1", "maxValue": "45.72+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "wall", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "3.66-0.1", "maxValue": "3.66+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Which of the following combinations of measurements are valid?
\n$2000\\,\\mathrm{kg}+500\\,\\mathrm{kg}$. [[0]]
\n$16\\,\\mathrm{GB}-8192\\,\\mathrm{B}$. [[1]]
\n$132\\,\\mathrm{cm}+18\\,\\mathrm{s}$. [[2]]
\n$40\\,\\mathrm{km}/\\mathrm{hr}+2\\,\\mathrm{ft}/\\mathrm{s}$. [[3]]
\n$1.2\\,\\mathrm{cm}^3+650\\,\\mathrm{mL}$. [[4]]
", "gaps": [{"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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["0", "1"], "distractors": ["", ""]}, {"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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Multiplying and dividing units", "extensions": [], "custom_part_types": [], "resources": ["question-resources/box.svg", "question-resources/nails.svg"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Unlike adding and subtracting, multiplying and dividing units of different types often carries physical meaning. When combining measurements in this way, we apply the same operation to both the values and the units.
\nFor example, if you travel $250$ kilometres in $2.5$ hours, then dividing these measurements gives $$\\frac{250\\,\\mathrm{km}}{2.5\\,\\mathrm{hr}}=100\\,\\frac{\\mathrm{km}}{\\mathrm{hr}}.$$
\nSince $\\mathrm{km}/\\mathrm{hr}$ is a measure of speed, this calculation says that the required speed to travel $250\\,\\mathrm{km}$ in $2.5\\,\\mathrm{hr}$ is $100\\,\\mathrm{km}/\\mathrm{hr}$.
\nSimilarly, if you buy $28$ steel beams for $\\$3150$, then the cost of each beam was
\n$$\\dfrac{\\$3150}{28\\,\\mathrm{beams}}=\\frac{3150}{28}\\,\\dfrac{\\$}{\\mathrm{beam}}=\\$112.50\\text{ per beam}.$$
\nAs another example, suppose we want to find the volume of a box whose dimensions are $2.3\\,\\mathrm{m}$ by $1.8\\,\\mathrm{m}$ by $0.5\\,\\mathrm{m}$.
\n{image('resources/question-resources/box.svg',10)}
\nSince volume is measured in $\\mathrm{m}^3$, this suggests that we need to multiply each of our measurements in $\\mathrm{m}$ together. Indeed, the total volume is
\n$$(2.3\\,\\mathrm{m})\\times (1.8\\,\\mathrm{m})\\times (0.5\\,\\mathrm{m})=2.07\\,\\mathrm{m}^3.$$
\n(Again, this is similar to algebra. Multiplying $2x$ and $3y$ gives $2x\\times 3y=6xy$, so the values and the variables both get multiplied.)
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Pressure is measured in the units Pascals ($\\mathrm{Pa}$) satisfying the conversion $1\\,{\\mathrm{Pa}}=1\\,\\mathrm{N}/\\mathrm{m}^2$. If a downward force of $90\\,\\mathrm{N}$ is uniformly applied to a table with an area of $3\\,\\mathrm{m}^2$, the pressure is obtained by [[0]], which gives [[1]] Pa.
\nInstead, consider a rectangular plate of dimensions $0.4\\,\\mathrm{m}$ by $1.5\\,\\mathrm{m}$. The area of this plate's surface is [[2]] $\\mathrm{m}^2$, so applying a force of $5\\,\\mathrm{kN}$ to this plate results in [[3]] Pascals of pressure.
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "operation", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["multiplying force and area", "adding force and area", "dividing force by area", "dividing area by force"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "press1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "30", "maxValue": "30", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "area", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "0.6", "maxValue": "0.6", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "press2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "8333-1", "maxValue": "8333+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "You are buying blue paint at a price of $\\$20$ for $5\\,\\mathrm{L}$. The unit price of the paint has units of $\\$/\\mathrm{L}$, and for this paint the unit price is [[0]] $\\$/\\mathrm{L}$.
\nTo find the cost of $215\\,\\mathrm{L}$ of paint, this volume of paint must be [[1]] the unit price, which gives a total of $\\$$ [[2]].
\nThe unit price allows us to compare the price of different paints. Suppose red paint is selling for $\\$30$ for $7\\,\\mathrm{L}$, which has a unit price of [[3]] $\\$/\\mathrm{L}$, so the [[4]] paint is cheaper.
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "uprice1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "4", "maxValue": "4", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "operation", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["added to", "multiplied with", "divided by"], "matrix": [0, "1", 0], "distractors": ["", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "price1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "860", "maxValue": "860", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "uprice2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "30/7-0.1", "maxValue": "30/7+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "cheaper", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["blue", "red"], "matrix": ["1", "0"], "distractors": ["", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "At a worksite of $4$ people, it takes $45$ minutes to hammer in $150$ nails. We want to rewrite this as a single measurement, will allow us to determine the conversion between these units.
\n{image('resources/question-resources/nails.svg',20)}
\nThe idea is that every person can hammer in a certain number of nails per minute. Or conversely, every nail is equal to a certain number of people-minutes, a unit made of multiplying people ($\\mathrm{ppl}$) and minutes ($\\mathrm{min}$).
\nOur initial conversion is [[0]] $\\mathrm{ppl}\\,\\mathrm{min}=150\\,\\mathrm{nails}$.
\nTherefore, we have $1\\,\\mathrm{ppl}\\,\\mathrm{min}=$ [[1]] $\\mathrm{nails}$, which is the number of nails that can be hammered by one person in one minute.
\nWith $11$ people working for $120$ minutes, we have a total of [[2]] $\\mathrm{ppl}\\,\\mathrm{min}$, which is equivalent to [[3]] $\\mathrm{nails}$.
\nOn the other hand, if you have $500$ nails this needs [[4]] $\\mathrm{ppl}\\,\\mathrm{min}$, and if you have $10$ people this will take [[5]] minutes.
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "ppl-min1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "180", "maxValue": "180", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "ppl-min2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "5/6+0.1", "maxValue": "5/6-0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "ppl-min3", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "1320", "maxValue": "1320", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "nails", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "1100", "maxValue": "1100", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "ppl-min4", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "600", "maxValue": "600", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "minutes", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "60", "maxValue": "60", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Compound unit conversions", "extensions": ["quantities"], "custom_part_types": [{"source": {"pk": 7, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/7/edit"}, "name": "Quantity with units", "short_name": "quantity", "description": "The student enters a quantity with units.
", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nunits(correct_quantity)*abs(eval(settings[\"wiggle\"]))\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "The scalar part of the student's quantity
", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "The units of the student's quantity, before converting.
", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "The units of the student's quantity.
\nIf the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.
", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "The student's answer, interpreted as a quantity.
\nMarking fails if the student does not enter a valid quantity.
", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "Are the units of the student's quantity compatible with the units of the expected quantity?
", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "/Are the student's quantity and the expected quantity in exactly the same units?
", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.
", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "Is the student's quantity within the allowed tolerance of the expected answer?
", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "units(correct_quantity)*abs(eval(settings[\"wiggle\"]))"}, {"name": "valid_number", "description": "Is the scalar part of the student's answer a valid number?
", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units:The student enters a quantity with units. Answer accepted as correct within range defined as percentage of expected answer.
", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])+\" to \"+string(settings[\"wiggle\"])+\"% accuracy\"\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nabs(eval(settings[\"wiggle\"]))*0.01*abs(settings[\"correctAnswer\"])\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "The scalar part of the student's quantity
", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "The units of the student's quantity, before converting.
", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "The units of the student's quantity.
\nIf the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.
", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "The student's answer, interpreted as a quantity.
\nMarking fails if the student does not enter a valid quantity.
", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "Are the units of the student's quantity compatible with the units of the expected quantity?
", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "/Are the student's quantity and the expected quantity in exactly the same units?
", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.
", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "Is the student's quantity within the allowed tolerance of the expected answer?
", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "abs(eval(settings[\"wiggle\"]))*0.01*abs(settings[\"correctAnswer\"])"}, {"name": "valid_number", "description": "Is the scalar part of the student's answer a valid number?
", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units:When making unit conversions involving compound units, we make each conversion separately and then combine the results using the operations.
\nFor example, suppose we want to write the standard highway speed $110\\,\\mathrm{km}/\\mathrm{hr}$ in terms of $\\mathrm{m}/\\mathrm{s}$. Since $1\\,\\mathrm{km}=1000\\,\\mathrm{m}$ and $1\\,\\mathrm{hr}=60\\,\\mathrm{min}=60\\cdot (60\\,\\mathrm{s})=3600\\,\\mathrm{s}$, we have $$110\\,\\frac{\\mathrm{km}}{\\mathrm{hr}}=110\\,\\frac{1000\\,\\mathrm{m}}{3600\\,\\mathrm{s}}=\\left(110\\cdot\\frac{1000}{3600}\\right)\\,\\frac{\\mathrm{m}}{\\mathrm{s}}\\approx 30.6\\,\\mathrm{m/s}.$$
\nAccording to our current theories of science, every measurement can be expressed as a combination of (specifically, through multiplying and dividing) the seven SI base units. Hence, it is common to express all measurements in terms of these units. These are:
\n| Unit | \nSymbol | \nType | \n
| second | \n$\\mathrm{s}$ | \nTime | \n
| metre | \n$\\mathrm{m}$ | \nLength | \n
| kilogram | \n$\\mathrm{kg}$ | \nMass | \n
| ampere | \n$\\mathrm{A}$ | \nElectric Current | \n
| kelvin | \n$\\mathrm{K}$ | \nTemperature | \n
| mole | \n$\\mathrm{mol}$ | \nQuantity | \n
| candela | \n$\\mathrm{cd}$ | \nLuminous Intensity | \n
Other units such as force measured in Newtons $(\\mathrm{N})$, pressure measured in Pascals ($\\mathrm{Pa}$), electric charge measured in Coulombs ($\\mathrm{C}$) and volume measured in kilolitres ($\\mathrm{kL}$) are equal to some multiplication or division of these base units, which are known as SI derived units.
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Using a tape measure, you measure the dimensions of a bedroom to be $180\\,\\mathrm{cm}$ by $240\\,\\mathrm{cm}$, which gives a total area of [[0]] $\\mathrm{cm}^2$.
\nThe appropriate SI derived units for area is $\\mathrm{m}^2$. Since $1\\,\\mathrm{cm}=$ [[1]] $\\mathrm{m}$, we have that $1\\,\\mathrm{cm}^2=$ [[2]] $\\mathrm{m}^2$ (remember to convert both $\\mathrm{cm}$ units!).
\nThe area of the room is then [[3]] $\\mathrm{m}^2$.
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "area1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "180*240", "maxValue": "180*240", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "conv1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "0.01", "maxValue": "0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "conv2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "0.0001", "maxValue": "0.0001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "area2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "1.8*2.4", "maxValue": "1.8*2.4", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "An industrial pipe has a flow rate of $3.2$ kilolitres per hour. The standard units for flow rate are:
[[0]]
(Hint: to write volume in standard units, use the conversion $1\\,\\mathrm{mL}=1\\,\\mathrm{cm}^3$)
We have that $3.2\\,\\mathrm{kL}=$ [[1]] $\\mathrm{mL}=$ [[1]] $\\mathrm{cm}^3=$ [[2]] $\\mathrm{m}^3$, and $1\\,\\mathrm{hr}=$ [[3]] $\\mathrm{s}$.
\nTherefore, the flow rate in standard units is [[4]].
\n", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "standard", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\mathrm{m}^3\\cdot \\mathrm{s}$", "$\\mathrm{cm}^3\\cdot \\mathrm{s}$", "$\\mathrm{m}^3/\\mathrm{s}$", "$\\mathrm{cm}^3/\\mathrm{s}$", "$\\mathrm{m}^2/\\mathrm{s}$", "$\\mathrm{cm}^2/\\mathrm{s}$"], "matrix": [0, 0, "1", 0, 0, 0], "distractors": ["", "", "", "", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "vol1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "3200000", "maxValue": "3200000", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "vol2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "3.2", "maxValue": "3.2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "seconds", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "3600", "maxValue": "3600", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "quantity", "useCustomName": true, "customName": "flow", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(0.001,\"m^3/s\")", "hint": "remind units", "allow_unitless": false, "incompatible_units_action": "prevent", "different_units_action": "prevent", "different_units_penalty": "100", "wiggle": "10^-3"}}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Because velocity is measured by the distance covered over a given time, its standard units are [[0]]
\nAcceleration is the change in velocity over time, so its standard units are [[1]]
\nBy Newton's Second Law of Motion $F=ma$ (force equals mass times acceleration), the derived unit of Newtons ($\\mathrm{N}$) for force has standard units [[2]]
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "vel", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\mathrm m$", "$\\mathrm m\\cdot \\mathrm s$", "$\\mathrm m/\\mathrm s$", "$\\mathrm s/\\mathrm m$"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "acc", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\mathrm m/\\mathrm s$", "$\\mathrm m^2\\cdot \\mathrm s$", "$\\mathrm m/\\mathrm s^2$", "$\\mathrm s/\\mathrm m^2$"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "frc", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\mathrm g\\cdot \\mathrm m/\\mathrm s^2$", "$\\mathrm{kg}\\cdot\\mathrm{m}/\\mathrm{s}^2$", "$\\mathrm g\\cdot \\mathrm s/\\mathrm{km}$", "$\\mathrm s^2/(\\mathrm{kg}\\cdot \\mathrm m)$"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Convert the following measurements to standard units. Remember to include the units with each measurement!
\n$0.05\\,\\mathrm{km}^2=$ [[0]]
\n$170\\,\\mathrm{mN}=$ [[1]]
\n$75\\,\\mathrm{L}=$ [[2]]
\n$1\\,\\mathrm{MN}/\\mathrm{km}=$ [[3]]
\n$180,000\\,\\mathrm{mg}/\\mathrm{N}=$ [[4]]
\n", "gaps": [{"type": "quantity-with-units-relative-tolerance", "useCustomName": true, "customName": "std1", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(0.05*1000^2, \"m^2\")", "hint": "none", "allow_unitless": false, "incompatible_units_action": "prevent", "different_units_action": "prevent", "different_units_penalty": "100", "wiggle": "2"}}, {"type": "quantity-with-units-relative-tolerance", "useCustomName": true, "customName": "std2", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(0.17, \"kg*m/s^2\")", "hint": "none", "allow_unitless": false, "incompatible_units_action": "prevent", "different_units_action": "prevent", "different_units_penalty": "100", "wiggle": "2"}}, {"type": "quantity-with-units-relative-tolerance", "useCustomName": true, "customName": "std3", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(0.075, \"m^3\")", "hint": "none", "allow_unitless": false, "incompatible_units_action": "prevent", "different_units_action": "prevent", "different_units_penalty": "100", "wiggle": "2"}}, {"type": "quantity-with-units-relative-tolerance", "useCustomName": true, "customName": "std4", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(1000, \"kg/s^2\")", "hint": "none", "allow_unitless": false, "incompatible_units_action": "prevent", "different_units_action": "prevent", "different_units_penalty": "100", "wiggle": "2"}}, {"type": "quantity-with-units-relative-tolerance", "useCustomName": true, "customName": "std5", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "quantity(0.18, \"s^2/m\")", "hint": "none", "allow_unitless": false, "incompatible_units_action": "prevent", "different_units_action": "prevent", "different_units_penalty": "100", "wiggle": "2"}}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Units Quiz", "extensions": ["quantities"], "custom_part_types": [{"source": {"pk": 7, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/7/edit"}, "name": "Quantity with units", "short_name": "quantity", "description": "The student enters a quantity with units.
", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nunits(correct_quantity)*abs(eval(settings[\"wiggle\"]))\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "The scalar part of the student's quantity
", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "The units of the student's quantity, before converting.
", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "The units of the student's quantity.
\nIf the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.
", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "The student's answer, interpreted as a quantity.
\nMarking fails if the student does not enter a valid quantity.
", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "Are the units of the student's quantity compatible with the units of the expected quantity?
", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "/Are the student's quantity and the expected quantity in exactly the same units?
", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.
", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "Is the student's quantity within the allowed tolerance of the expected answer?
", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "units(correct_quantity)*abs(eval(settings[\"wiggle\"]))"}, {"name": "valid_number", "description": "Is the scalar part of the student's answer a valid number?
", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units:A randomised quiz covering the main topics for units in BLDG1022.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"type": {"name": "type", "group": "Ungrouped variables", "definition": "random([0,1,2])", "description": "", "templateType": "anything", "can_override": false}, "a1,a2,factor": {"name": "a1,a2,factor", "group": "Ungrouped variables", "definition": "[random(11..99),random(1.1..9.9#0.1),[3.28,2.54,28.3][type]]", "description": "", "templateType": "anything", "can_override": false}, "prefix": {"name": "prefix", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "b1,b2": {"name": "b1,b2", "group": "Ungrouped variables", "definition": "[random(1.1..9.9#0.1),random(1100..9900#100)]", "description": "", "templateType": "anything", "can_override": false}, "c,unit": {"name": "c,unit", "group": "Ungrouped variables", "definition": "[random(11.1..99.9#0.1),[\"m\",\"km\",\"mL\",\"L\"][type2]]", "description": "", "templateType": "anything", "can_override": false}, "type2": {"name": "type2", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "s,d,t,type3": {"name": "s,d,t,type3", "group": "Ungrouped variables", "definition": "[random(11..99#1),random(110..990#1),random(1.1..9.9),random([\"d\",\"t\"])]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["type", "a1,a2,factor", "prefix", "b1,b2", "type2", "c,unit", "s,d,t,type3"], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Using the conversion
\n$$1\\,\\mathrm{m}=3.28\\,\\mathrm{ft},$$$$1\\,\\mathrm{in}=2.54\\,\\mathrm{cm},$$$$1\\,\\mathrm{oz}=28.3\\,\\mathrm{g},$$
\nwe have $\\var{a1}$ $\\mathrm{m}$$\\mathrm{in}$$\\mathrm{oz}$ $=$ [[0]] $\\mathrm{ft}$$\\mathrm{cm}$$\\mathrm{g}$, and $\\var{a2}$ $\\mathrm{ft}$$\\mathrm{cm}$$\\mathrm{g}$ $=$ [[1]] $\\mathrm{m}$$\\mathrm{in}$$\\mathrm{oz}$.
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "conv1", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "a1*factor-1", "maxValue": "a1*factor+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "tonearest(a1*factor,0.1)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "conv2", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "a2/factor-0.1", "maxValue": "a2/factor+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "tonearest(a2/factor,0.1)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "We have $1\\,\\mathrm{km}=$ [[0]] $\\mathrm{m}$ $1\\,\\mathrm{kL}=$ [[0]] $\\mathrm{L}$$1\\,\\mathrm{L}=$ [[0]] $\\mathrm{mL}$$1\\,\\mathrm{V}=$ [[0]] $\\mathrm{mV}$, so $\\var{b1}\\,\\mathrm{km}+\\var{b2}\\,\\mathrm{m}=$ [[1]] $\\mathrm{km}$ $\\var{b1}\\,\\mathrm{km}+\\var{b2}\\,\\mathrm{m}=$ [[1]] $\\mathrm{km}$ $\\var{b1}\\,\\mathrm{kL}+\\var{b2}\\,\\mathrm{L}=$ [[1]] $\\mathrm{kL}$ $\\var{b1}\\,\\mathrm{L}+\\var{b2}\\,\\mathrm{mL}=$ [[1]] $\\mathrm{L}$ $\\var{b1}\\,\\mathrm{V}+\\var{b2}\\,\\mathrm{mV}=$ [[1]] $\\mathrm{mV}$.
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "prefix", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "1000", "maxValue": "1000", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "sum", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "b1+b2/1000-0.1", "maxValue": "b1+b2/1000+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "tonearest(b1+b2/1000,0.1)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "If you drive at $\\var{s}\\,\\mathrm{km}/\\mathrm{hr}$ for $\\var{t}$ hours, how far can you travel?
\nHow long does it take to drive $\\var{d}\\,\\mathrm{km}$ if you travel at $\\var{s}\\,\\mathrm{km}/\\mathrm{hr}$?
\n[[0]]
\nInclude units.
", "gaps": [{"type": "quantity", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "settings": {"correctAnswer": "if(type3=\"d\",tonearest(s*t,1)*quantity(1,\"km\"),tonearest(d/s,1)*quantity(1,\"hr\"))", "hint": "none", "allow_unitless": false, "incompatible_units_action": "prevent", "different_units_action": "convert", "different_units_penalty": "100", "wiggle": "1"}}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Using that $1\\,\\mathrm{hr}=3600\\,\\mathrm{s}$, we have $\\var{c}\\,\\mathrm{m}/\\mathrm{s}=$ [[0]] $\\mathrm{km}/\\mathrm{hr}$$\\var{c}\\,\\mathrm{km}/\\mathrm{hr}=$ [[0]] $\\mathrm{m}/\\mathrm{s}$$\\var{c}\\,\\mathrm{mL}/\\mathrm{s}=$ [[0]] $\\mathrm{L}/\\mathrm{hr}$$\\var{c}\\,\\mathrm{L}/\\mathrm{hr}=$ [[0]] $\\mathrm{mL}/\\mathrm{s}$
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "conv", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "c*if(unit=\"m\" or unit=\"mL\",3.6,1/3.6)-0.1", "maxValue": "c*if(unit=\"m\" or unit=\"mL\",3.6,1/3.6)+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "tonearest(c*if(unit=\"m\" or unit=\"mL\",3.6,1/3.6),0.1)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "The unit Newtons ($\\mathrm{N}$) is a measurement of [[0]] and is equivalent to:
\n[[1]]
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "type", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["acceleration", "pressure", "energy", "work", "force"], "matrix": [0, 0, 0, 0, "0.5"], "distractors": ["", "", "", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "units", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": "2", "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$1\\,\\mathrm{kg}\\,\\mathrm{m}/\\mathrm{s}^2$", "$1\\,\\mathrm{m}/\\mathrm{s}^2$", "$1\\,\\mathrm{g}\\,\\mathrm{m}/\\mathrm{s}$", "$1\\,\\mathrm{kg}\\,\\mathrm{m}^2/\\mathrm{s}^2$", "$1\\,\\mathrm{g}^2\\,\\mathrm{m}/\\mathrm{s}^2$", "$1\\,\\mathrm{kg}\\,\\mathrm{m}^2/\\mathrm{s}$", "$1\\,\\mathrm{g}\\,\\mathrm{s}/\\mathrm{m}^2$", "$1\\,\\mathrm{kg}\\,\\mathrm{s}/\\mathrm{m}$"], "matrix": ["0.5", 0, 0, 0, 0, 0, 0, 0], "distractors": ["", "", "", "", "", "", "", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}]}, {"name": "Trigonometry", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", ""], "variable_overrides": [[], [], [], [], []], "questions": [{"name": "Angles", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Angles are a measurement of how far apart the directions of two lines are. The most common units for angles are degrees. For example, two perpendicular lines have an angle between them of $90^\\circ$ 90 degrees. This is also known as a right angle.
{angle}
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"angle": {"name": "angle", "group": "Ungrouped variables", "definition": "jessiecode(400,400,[-1.2,1.2,1.2,-1.2],safe(\"\"\"\n\ncirc = circle([0,0], 1) << \n\tfixed: true, highlight: false,\n\tstrokeColor: \"black\", strokeOpacity: 0.1\n>>; \n\np = glider(cos(PI/4),sin(PI/4),circ) <<\n withLabel: false, size: 5,\n fillColor: \"Coral\", highlightFillColor: \"Coral\",\n showInfoBox: false, strokeColor: \"black\"\n >>;\n\nq = glider(cos(3*PI/4),sin(3*PI/4),circ) <<\n withLabel: false, size: 5,\n fillColor: \"Coral\", highlightFillColor: \"Coral\",\n showInfoBox: false, strokeColor: \"black\"\n >>;\n\n\norigin = point(0,0) <<\n\tfixed: true, highlight: false, withLabel: false, showInfoBox: false,\n\tcolor: \"black\", size: 1, strokeOpacity: 1 >>;\n\t\nl1 = segment(origin, p) <<\n\tfixed: true, highlight: false, \n\tcolor: \"black\", strokeWidth: 2>>; \n\t\nl2 = segment(origin, q) <<\n\tfixed: true, highlight: false, \n\tcolor: \"black\", strokeWidth: 2>>; \n\t\nang = angle(p, origin, q) << \n\tfixed: true, highlight: false,\n\twithLabel: false, color: \"SeaGreen\",\n\torthoSensitivity: -1>>;\n\ntxt = text(0.25, 1.1, function() {return \"angle: \" + round(ang.Value()*180/PI) + \"${}^{\\\\\\\\circ}$\";}) << \n\tfixed: true, highlight: false,\n\tfontSize: 25\n\t>>; \n\"\"\"),\n[\"axis\": false, \"pan\": [\"enabled\": false], \"zom\": [\"enabled\": false]])", "description": "", "templateType": "anything", "can_override": false}, "triangle": {"name": "triangle", "group": "Ungrouped variables", "definition": "jessiecode(400,400,[-1.2,1.2,1.2,-1.2],safe(\"\"\"\n\np = point(-1,0) <<\n fixed: false, withLabel: false, size: 5,\n fillColor: \"Coral\", highlightFillColor: \"Coral\",\n showInfoBox: false, strokeColor: \"black\"\n >>;\n\nq = point(-0.1,-0.8) <<\n fixed: false, withLabel: false, size: 5,\n fillColor: \"Coral\", highlightFillColor: \"Coral\",\n showInfoBox: false, strokeColor: \"black\"\n >>;\n \nr = point(0.8,0.8) <<\n fixed: false, withLabel: false, size: 5,\n fillColor: \"Coral\", highlightFillColor: \"Coral\",\n showInfoBox: false, strokeColor: \"black\"\n >>;\n\nl1 = segment(p,q) <<\n\tfixed: false, highlight: false, \n\tcolor: \"black\", strokeWidth: 2>>; \n\nl2 = segment(q,r) <<\n\thighlight: false, \n\tcolor: \"black\", strokeWidth: 2>>; \n \nl3 = segment(r,p) <<\n\thighlight: false, \n\tcolor: \"black\", strokeWidth: 2>>; \n \nangp = nonreflexangle(q,p,r) << id:\"angp\",\n\tfixed: false, highlight: false,\n\twithLabel: false, color: \"Purple\",\n\torthoSensitivity: -1, radius: 0.2, fillOpacity: 0.6>>;\n \nangq = nonreflexangle(p,q,r) << id:\"angq\",\n\tfixed: false, highlight: false,\n\twithLabel: false, color: \"DodgerBlue\",\n\torthoSensitivity: -1, radius: 0.2, fillOpacity: 0.6>>;\n \nangr = nonreflexangle(p,r,q) << id:\"angr\",\n\tfixed: false, highlight: false,\n\twithLabel: false, color: \"SeaGreen\",\n\torthoSensitivity: -1, radius: 0.2, fillOpacity: 0.6>>;\n\n// Make the radius smaller when closer to 180 degrees\nangp.radius = function() {return 0.4*(PI-angp.Value())/PI;}; \nangq.radius = function() {return 0.4*(PI-angq.Value())/PI;};\nangr.radius = function() {return 0.4*(PI-angr.Value())/PI;}; \n \n// Return the values of the functions rounded to 1 decimal place\nangpt = function() {return round(angp.Value()*1800/PI)/10;};\nangqt = function() {return round(angq.Value()*1800/PI)/10;};\nangrt = function() {return round(angr.Value()*1800/PI)/10;};\n \ntxtp = text(-1.1, 1.1, function() {return \"$\\\\\\\\alpha_1=$ \"+ angpt() + \"${}^{\\\\\\\\circ}$\";}) << \n\tfixed: true, highlight: false,\n\tfontSize: 20, color: \"purple\"\n\t>>; \n \ntxtq = text(-0.35, 1.1, function() {return \"$\\\\\\\\alpha_2=$ \"+ angqt() + \"${}^{\\\\\\\\circ}$\";}) << \n\tfixed: true, highlight: false,\n\tfontSize: 20, color: \"DodgerBlue\"\n\t>>; \n\ntxtr = text(0.4, 1.1, function() {return \"$\\\\\\\\alpha_3=$ \" + angrt() + \"${}^{\\\\\\\\circ}$\";}) << \n\tfixed: true, highlight: false,\n\tfontSize: 20, color: \"SeaGreen\"\n\t>>; \n\n\"\"\"),\n[\"axis\": false, \"pan\": [\"enabled\": false], \"zoom\": [\"enabled\": false]])", "description": "", "templateType": "anything", "can_override": false}, "findangle": {"name": "findangle", "group": "Ungrouped variables", "definition": "jessiecode(400,200,[0,2,4,0],safe(\"\"\"\n \nb0 = point(0.2,0.2) <<\n fixed: false, withLabel: false, size: 0,\n showInfoBox: false\n >>;\n \nb1 = point(1,0.2) <<\n fixed: false, withLabel: false, size: 0,\n showInfoBox: false\n >>;\n \nb2 = point(3.8,0.2) <<\n fixed: false, withLabel: false, size: 0,\n showInfoBox: false\n >>;\n\np = point(3.8,1.8) <<\n fixed: false, withLabel: false, size: 0,\n showInfoBox: false\n >>;\n \nsegment(b0,b2) <<\n\thighlight: false, \n\tcolor: \"black\", strokeWidth: 2\n >>;\nsegment(b2,p) <<\n\thighlight: false, \n\tcolor: \"black\", strokeWidth: 2\n >>;\nsegment(b1,p) <<\n\thighlight: false, \n\tcolor: \"black\", strokeWidth: 2\n >>;\n \nangp1 = angle(p,b1,b0) << \n\tfixed: true, highlight: false,\n\twithLabel: true, color: \"GoldenRod\",\n\torthoSensitivity: -1, radius: 0.3,\n name: \"$155^\\\\\\\\circ$\">>;\nangp1.label.fontSize = 20;\nangp1.label.color = \"black\";\nangp1.label.offset = [0,0];\nangp1.label.highlight = false;\nangp1.label.position = '0.5fr right';\nangp1.label.distance = 0.8;\n \nangp2 = angle(b1,p,b2) << \n\tfixed: true, highlight: false,\n\twithLabel: true, color: \"FireBrick\",\n\torthoSensitivity: -1, radius: 0.4,\n name: \"$\\\\\\\\theta$\">>;\nangp2.label.fontSize = 20;\nangp2.label.color = \"black\";\nangp2.label.offset = [0,0];\nangp2.label.highlight = false;\nangp2.label.position = '0.5fr right';\nangp2.label.distance = 0.8;\n \n \nangp1 = angle(p,b2,b1) << \n\tfixed: true, highlight: false,\n\twithLabel: false, color: \"black\",fillOpacity:0,\n\torthoSensitivity: 10, radius: 0.2,\n name: \"$155^\\\\\\\\circ$\">>;\n\n\"\"\"),\n[\"axis\": false, \"pan\": [\"enabled\": false], \"zoom\": [\"enabled\": false]])", "description": "A right triangle with an external angle of $155^\\circ$, whose opposite angle is labelled $\\theta$
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["angle", "triangle", "findangle"], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "When two lines are close together, the angle between them is [[0]].
\nThe number of degrees in a full circle is [[1]], and so the angle between two lines pointing in exactly opposite directions is [[2]]${}^\\circ$.
\nIf you are travelling east and turn to face north-west, you have turned [[3]]${}^\\circ$.
\nWhen the time is 2:15pm, the angle between the two hands of a standard clock is [[4]]${}^\\circ$.
\n", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "size", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["small", "large"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "full", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "360", "maxValue": "360", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "half", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "180", "maxValue": "180", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "E to NW", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "135", "maxValue": "135", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "clock", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "30", "maxValue": "30", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "extension", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "interpreted_answer:\n [jxg_value(triangle[\"angp\"])*180/pi,\n jxg_value(triangle[\"angq\"])*180/pi,\n jxg_value(triangle[\"angr\"])*180/pi]\n\ncorrect_answer:\n [60,60,60]\n\nmark:\n let(A, interpreted_answer, \n if(withintolerance(A[0],A[1],1) and withintolerance(A[0],A[2],1) and withintolerance(A[1],A[2],1),\n correct(), incorrect())\n )\n", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "A useful fact: the sum of angles in any triangle is always $180^\\circ$. Experiment with this fact by moving the nodes in the triangle below.
\n{triangle}
\nMoves the nodes to make all of the angles equal. The question will be marked correct if all nodes are within one degree of each other.
"}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "In an equilateral triangle where all sides have the same length, the angle between any two sides is [[0]]${}^\\circ$.
\nIn a right-angled triangle with a $10^\\circ$ angle, the remaining angle is [[1]]${}^\\circ$.
\nDetermine the angle $\\theta$ in the picture below:
\n{findangle}
\n$\\theta=$ [[2]]${}^\\circ$.
\n", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "ang1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "60", "maxValue": "60", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "ang2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "80", "maxValue": "80", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "ang3", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "65", "maxValue": "65", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Pythagoras Theorem", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": ["question-resources/cable.svg"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Just as knowing two of the angles in a triangle tells you the third, in a right-angled triangle (where one angle is $90^\\circ$), knowing two sides tells you the other one.
\n{pythag}
\nIf $a,b,c$ are the lengths of the sides where $c$ is the longest side (known as the hypotenuse), then the Pythagoras Theorem gives the relationship
\n$$a^2+b^2=c^2.$$
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"pythag": {"name": "pythag", "group": "Ungrouped variables", "definition": "jessiecode(400,200,[0,2,4,0],safe(\"\"\"\n \np = point(0.5,0.2) <<\n fixed: true, withLabel: false, size: 0,\n showInfoBox: false\n >>;\nq = point(0.5,1.5) <<\n fixed: true, withLabel: false, size: 0,\n showInfoBox: false\n >>;\n \nr = point(3.8,1.5) <<\n fixed: true, withLabel: false, size: 0,\n showInfoBox: false\n >>;\n\na = segment(p,q) <<\n\tfixed: true, highlight: false, name: \"$a$\", withLabel: true,\n\tcolor: \"black\", strokeWidth: 2\n >>;\na.label.fontSize = 30;\na.label.color = \"black\";\na.label.anchorX = \"middle\";\na.label.anchorY = \"middle\";\na.label.offset = [-15,0];\na.label.highlight = false; \n \nb = segment(q,r) <<\n\tfixed: true, highlight: false, name: \"$b$\", withLabel: true,\n\tcolor: \"black\", strokeWidth: 2\n >>;\nb.label.fontSize = 30;\nb.label.color = \"black\";\nb.label.anchorX = \"middle\";\nb.label.anchorY = \"middle\";\nb.label.offset = [0,20];\nb.label.highlight = false; \n\nc = segment(p,r) <<\n\tfixed: true, highlight: false, name: \"$c$\", withLabel: true,\n\tcolor: \"black\", strokeWidth: 2\n >>;\nc.label.fontSize = 30;\nc.label.color = \"black\";\nc.label.anchorX = \"middle\";\nc.label.anchorY = \"middle\";\nc.label.offset = [10,-10];\nc.label.highlight = false; \n \n \nang = angle(p,q,r) << \n\tfixed: true, highlight: false,\n\twithLabel: false, color: \"black\",fillOpacity:0,\n\torthoSensitivity: 10, radius: 0.3,\n name: \"$155^\\\\\\\\circ$\">>;\n\"\"\"),\n[\"axis\": false, \"pan\": [\"enabled\": false], \"zoom\": [\"enabled\": false]])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["pythag"], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "In the above triangle, suppose the two base side lengths are $a=5$ and $b=11$. We want to find the length of the longest side.
\nFirst calculate $a^2=$ [[0]] and $b^2=$ [[1]], so $a^2+b^2=$ [[2]].
\nBy Pythagoras' Theorem, $c^2=$ [[3]].
\nTo find $c$, we have to take the square root, which we can do by using the $\\sqrt{\\quad}$ button on a calculator or typing sqrt( ) in most computer terminals, including a search engine.
The length of the longest side is $c=$ [[4]]. (Round your answer to one or two decimal places.)
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a^2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "25", "maxValue": "25", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "b^2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "121", "maxValue": "121", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "a^2+b^2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "146", "maxValue": "146", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c^2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "146", "maxValue": "146", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "sqrt(146)-0.1", "maxValue": "sqrt(146)+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "From an electrical tower with a height of $75\\,\\mathrm{m}$, a cable of length $400\\,\\mathrm{m}$ is extended to reach as far along the ground as possible.
\n{image('resources/question-resources/cable.svg',20)}
\nThis gives a right-angled triangle whose longest side is [[0]] $\\mathrm{m}$.
\nUsing the equation in Pythgaoras' Theorem, we have $d^2=$ [[1]] and so $d=$ [[2]].
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "longest", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "400", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "valuegenerators": [], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "numberentry", "useCustomName": true, "customName": "d^2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "154375", "maxValue": "154375", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "d", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "sqrt(154375)-1", "maxValue": "sqrt(154375)+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Trigonometry ratios", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": ["question-resources/ladder.svg", "question-resources/tower.svg"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Using the trigonometric ratios, we can use one angle and one side length in a right-angled triangle to find the other side lengths. In the next section, we will use the inverse ratios to find the angle in triangles using information about the side lengths.
\nThe usual setup is to start with a triangle with one angle of $90^\\circ$ (the right angle, pictured in the bottom-left), and another angle of interest $\\theta$ theta. We label the sides as follows:
{triangle}
\nThe ratio between any two side lengths depends solely on the angle $\\theta$. Therefore, we give the names sine, cosine and tangent to the ratios made of the three possible pairs of side lengths as follows:
\n$$\\sin(\\theta)=\\frac{O}{H},\\qquad \\cos(\\theta)=\\frac{A}{H},\\qquad \\tan(\\theta)=\\frac{O}{A}$$
\nThe left-hand sides of these equations can be determined on any standard calculator. For example, $\\sin(35^\\circ)=0.57$.
\nNote: angles can also be measured in 'radians' rather than 'degrees'. Make sure your calculator is set to degrees mode, otherwise the above calculation will give a different answer!
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"triangle": {"name": "triangle", "group": "Ungrouped variables", "definition": "jsxgraph(\n 400, 250, [-1,4,7,-1],\n [\n ['point', [0,0], [\"id\":\"P\",\"size\":2,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false, \"showInfoBox\": false\n ]],\n \n ['point', [0,3], [\"id\":\"Q\",\"size\":2,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false, \"showInfoBox\": false\n ]],\n \n ['point', [6,0], [\"id\":\"R\",\"size\":2,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false, \"showInfoBox\": false\n ]],\n ['segment', ['Q','R'], [\"id\":\"h\",\"strokeWidth\":2,\"name\":\"$H$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['segment', ['Q', 'P'], [\"id\":\"o\",\"strokeWidth\":2,\"name\":\"$O$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.4,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['segment', ['R','P'], [\"id\":\"a\",\"strokeWidth\":2,\"name\":\"$A$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['curve', [[0.5,0.5,0],[0,0.5,0.5]], [\"strokeWidth\":2,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false,\"strokeColor\":\"black\",\n ]],\n \n ['angle',['Q','R','P'],[\"radius\":1.5,\"name\":\"$\\\\theta$\",\n \"label\": [\n \"color\":\"black\",\n \"offset\": [0, 0],\n \"distance\": 1,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]]\n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "towerheight": {"name": "towerheight", "group": "Ungrouped variables", "definition": "jsxgraph(\n 280, 440, [-11,21,3,-1],\n [\n ['image', ['resources/question-resources/tower.svg',[-1.3,0], [2.6,20]],\n [\"fixed\":true, \"highlight\":false]],\n \n ['point', [0,0.07], [\"id\":\"O\",\"size\":0,\"withLabel\":false,\n \"fixed\":true, \"showInfoBox\": false]],\n ['point', [-9.49,0.07], [\"id\":\"A\",\"size\":0,\"withLabel\":false,\n \"fixed\":true, \"showInfoBox\": false]],\n ['point', [0,20], [\"id\":\"B\",\"size\":0,\"withLabel\":false,\n \"fixed\":true, \"showInfoBox\": false]],\n \n ['segment', ['A','O'], [\"id\":\"base\",\"strokeWidth\":2,\"name\":\"$146\\\\,\\\\mathrm{m}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\"dash\":2,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.1,\n \"position\": '0.6fr left',\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]],['segment', ['A','B'], [\"id\":\"hypot\",\"strokeWidth\":2,\n \"withLabel\":false,\"dash\":2,\"highlight\":false \n ]],['angle',['O','A','B'],[\"radius\":2,\"name\":\"$65^\\\\circ$\",\n \"color\":\"ForestGreen\",\"highlight\":false,\n \"label\": [\n \"color\":\"black\",\n \"offset\": [0, 0],\n \"distance\": 2.1,\n \"position\": '0.4fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]]\n ],\n [\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false],\"axis\":[\"visible\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["triangle", "towerheight"], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "A ladder is leaning against a wall at an angle of $\\theta=40^\\circ$. The ladder has a length of $1.75\\,\\mathrm{m}$.
\n{image('resources/question-resources/ladder.svg',15)}
\nTo two decimal places, calcuate $\\sin(40^\\circ)=$ [[0]], $\\cos(40^\\circ)=$ [[1]] and $\\tan(40^\\circ)=$ [[2]].
\nSuppose $d$ is the distance along the floor from the ladder to the wall. Then the relevant trigonometric ratio between $d$ and the length of the ladder is:
[[3]]
Using the calculated ratio and solving the equation gives $d=$ [[4]].
\n", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "sin", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "sin(radians(40))-0.01", "maxValue": "sin(radians(40))+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "cos", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "cos(radians(40))-0.01", "maxValue": "cos(radians(40))+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "tan", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "tan(radians(40))-0.01", "maxValue": "tan(radians(40))+0.01", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "ratio", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\sin(40^\\circ)=1.75/d$", "$\\sin(40^\\circ)=d/1.75$", "$\\cos(40^\\circ)=1.75/d$", "$\\cos(40^\\circ)=d/1.75$"], "matrix": [0, 0, 0, "1"], "distractors": ["", "", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "d", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "1.75*cos(radians(40))-0.1", "maxValue": "1.75*cos(radians(40))+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "We want to estimate the height of Sydney tower with only a protractor. Standing at the entrace of Hyde Park, the shopping center below the tower is $146\\,\\mathrm{m}$ away. If you point towards the top of the tower, you arm will make an angle of $65^\\circ$ from the ground.
\n{towerheight}
\nWhich equation does the height $h$ of the tower satisfy?
[[0]]
Using a calculator to find the trig ratio, the height of Sydney Tower is $h=$ [[1]] $\\mathrm{m}$.
\nIf you stand at the front steps of St. Mary's Cathedral, the angle to the top of Sydney Tower is approximately $35^\\circ$. Use this to set up a trig ratio and find the distance from the steps to the base of the tower: [[2]] $\\mathrm{m}$.
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "ratio", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\sin(65^\\circ)=\\dfrac{h}{146}$", "$\\cos(65^\\circ)=\\dfrac{h}{146}$", "$\\tan(65^\\circ)=\\dfrac{h}{146}$", "$\\tan(65^\\circ)=\\dfrac{146}{h}$"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "h", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "146*tan(radians(65))-1", "maxValue": "146*tan(radians(65))+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "d", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "146*tan(radians(65))/tan(radians(35))-3", "maxValue": "146*tan(radians(65))/tan(radians(35))+3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Inverse ratios", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Just like we undo addition with subtraction, multiplication with division, and the square in the equation $x^2=25$ with a square root, we undo the trigonometric ratios with the inverse trig ratio. The inverse of $\\sin$ is $\\sin^{-1}$, pronounced sine inverse. For example, if
\n$$\\sin(\\theta)=\\dfrac{2}{3}$$
\nthen
\n$$\\theta=\\sin^{-1}\\left(\\dfrac{2}{3}\\right).$$
\nSome calculators might have the button arcsin or asin to represent this inverse ratio.
In our standard setup:
\n{triangle}
\nwe can find $\\theta$ using any of the equations:
\n$$\\theta=\\sin^{-1}\\left(\\dfrac{O}{H}\\right),\\qquad\\theta=\\cos^{-1}\\left(\\dfrac{A}{H}\\right),\\qquad\\theta=\\tan^{-1}\\left(\\dfrac{O}{A}\\right)$$
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"triangle": {"name": "triangle", "group": "Ungrouped variables", "definition": "jsxgraph(\n 400, 250, [-1,4,7,-1],\n [\n ['point', [0,0], [\"id\":\"P\",\"size\":2,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false,\"showInfoBox\":false\n ]],\n \n ['point', [0,3], [\"id\":\"Q\",\"size\":2,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false,\"showInfoBox\":false\n ]],\n \n ['point', [6,0], [\"id\":\"R\",\"size\":2,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false,\"showInfoBox\":false\n ]],\n ['segment', ['Q','R'], [\"id\":\"h\",\"strokeWidth\":2,\"name\":\"$H$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['segment', ['Q', 'P'], [\"id\":\"o\",\"strokeWidth\":2,\"name\":\"$O$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.4,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['segment', ['R','P'], [\"id\":\"a\",\"strokeWidth\":2,\"name\":\"$A$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['curve', [[0.5,0.5,0],[0,0.5,0.5]], [\"strokeWidth\":2,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false,\"strokeColor\":\"black\",\n ]],\n \n ['angle',['Q','R','P'],[\"radius\":1.5,\"name\":\"$\\\\theta$\",\n \"highlight\":false,\n \"label\": [\n \"color\":\"black\",\n \"offset\": [0, 0],\n \"distance\": 1,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]]\n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "triangle2": {"name": "triangle2", "group": "Ungrouped variables", "definition": "jsxgraph(\n 350, 225, [-1,3.5,6,-1],\n [\n ['point', [0,0], [\"id\":\"P\",\"size\":0,\"withLabel\":false,\"showInfoBox\":false\n ]],\n ['point', [1.8,2.4], [\"id\":\"Q\",\"size\":0,\"withLabel\":false,\"showInfoBox\":false\n ]],\n ['point', [5,0], [\"id\":\"R\",\"size\":0,\"withLabel\":false,\"showInfoBox\":false\n ]],\n ['segment', ['Q','R'], [\"strokeWidth\":2,\"name\":\"$4$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['segment', ['Q', 'P'], [\"strokeWidth\":2,\"name\":\"$3$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.6,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['segment', ['P','R'], [\"strokeWidth\":2,\"name\":\"$d$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.2,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n \n ['angle',['P','Q','R'],[\"radius\":0.4,\"color\":\"ForestGreen\",\"withLabel\":false,\n \"highlight\":false\n ]],\n \n ['angle',['R','P','Q'],[\"radius\":0.6,\"name\":\"$\\\\alpha$\",\"color\":\"ForestGreen\",\n \"highlight\":false,\n \"label\": [\n \"color\":\"black\",\n \"offset\": [0, 0],\n \"distance\": 2.3,\n \"position\": '0.4fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n \n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "triangle3": {"name": "triangle3", "group": "Ungrouped variables", "definition": "jsxgraph(\n 348, 192, [-11,7,3.5,-1],\n [\n ['point', [0,0], [\"id\":\"P\",\"size\":0,\"withLabel\":false,\"showInfoBox\":false\n ]],\n ['point', [-10.392,6], [\"id\":\"Q\",\"size\":0,\"withLabel\":false,\"showInfoBox\":false\n ]],\n ['point', [2.5,4.33], [\"id\":\"R\",\"size\":0,\"withLabel\":false,\"showInfoBox\":false\n ]],\n ['segment', ['Q','R'], [\"strokeWidth\":2,\"name\":\"$13$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.1,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['segment', ['Q', 'P'], [\"strokeWidth\":2,\"name\":\"$12$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.2,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['segment', ['P','R'], [\"strokeWidth\":2,\"name\":\"$x$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.2,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n \n ['angle',['R','P','Q'],[\"radius\":0.8,\"color\":\"ForestGreen\",\"withLabel\":false,\n \"highlight\":false\n ]],\n \n ['angle',['P','Q','R'],[\"radius\":3,\"name\":\"$\\\\beta$\",\"color\":\"ForestGreen\",\n \"highlight\":false,\n \"label\": [\n \"color\":\"black\",\n \"offset\": [0, 0],\n \"distance\": 3,\n \"position\": '0.67fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n \n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["triangle", "triangle2", "triangle3"], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Below is a right-angled triangle:
\n{triangle2}
\nThe hypotenuse of the triangle has length [[0]], and by Pythagoras' Theorem we have $d^2=$ [[1]], and so by taking the square root of both sides we get $d=$ [[2]].
\nWe have $\\sin(\\alpha)=$ [[3]], $\\cos(\\alpha)=$ [[4]] and $\\tan(\\alpha)=$ [[5]].
\nUsing the inverse of any of these three ratios, find the angle $\\alpha=$ [[6]]${}^\\circ$. Then try the other two and check that you get the same answer!
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "hypot", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["3", "4", "d"], "matrix": [0, 0, "1"], "distractors": ["", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "d^2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "25", "maxValue": "25", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "d", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "5", "maxValue": "5", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "sin", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "4/5-0.1", "maxValue": "4/5+0.1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": true, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "cos", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "3/5-0.1", "maxValue": "3/5+0.1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": true, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "tan", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "4/3-0.1", "maxValue": "4/3+0.1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": true, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "alpha", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "degrees(arctan(4/3))-1", "maxValue": "degrees(arctan(4/3))+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "{triangle3}
\nThe hypotenuse of the triangle has length [[0]], and so $x=$ [[1]].
\nWe have $\\cos(\\beta)=$ [[2]], and by calculating the appropriate inverse trigonometric ratio: $\\beta=$ [[3]]${}^\\circ$.
\nSince the sum of angles in a triangle is always [[4]], the other angle in the triangle is [[5]]${}^\\circ$.
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "hypot", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["12", "13", "x"], "matrix": [0, "1", "0"], "distractors": ["", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "d", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "5", "maxValue": "5", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "cos", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "12/13-0.1", "maxValue": "12/13+0.1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": true, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "beta", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "degrees(arccos(12/13))-1", "maxValue": "degrees(arccos(12/13))+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "anglesum", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["90 degrees", "100 degrees", "180 degrees", "360 degrees"], "matrix": [0, "0", "1", 0], "distractors": ["", "", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "other", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "90-degrees(arccos(12/13))-1", "maxValue": "90-degrees(arccos(12/13))+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Trig Quiz", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": ["question-resources/tree.svg"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "A randomised quiz covering the main topics for trigonometry in BLDG1022.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"tree": {"name": "tree", "group": "Ungrouped variables", "definition": "jsxgraph(\n 420, 270, [-3,8,11,-1],\n [\n ['image', ['resources/question-resources/tree.svg',[-1.3,0], [2.6,7]],\n [\"fixed\":true, \"highlight\":false]],\n \n ['point', [0,0.07], [\"id\":\"O\",\"size\":0,\"withLabel\":false,\"fixed\":true,\"showInfoBox\":false]],\n ['point', [9.49,0.07], [\"id\":\"A\",\"size\":0,\"withLabel\":false,\"fixed\":true,\"showInfoBox\":false]],\n ['point', [0,7], [\"id\":\"B\",\"size\":0,\"withLabel\":false,\"fixed\":true,\"showInfoBox\":false]],\n \n ['segment', ['A','O'], [\"id\":\"base\",\"strokeWidth\":2,\"name\":\"$\\\\var{dist}\\\\,\\\\mathrm{m}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\"dash\":2,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 0.8,\n \"position\": '0.6fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]],['segment', ['A','B'], [\"id\":\"hypot\",\"strokeWidth\":2,\"withLabel\":false,\"dash\":2,\"highlight\":false \n ]],['angle',['B','A','O'],[\"radius\":2,\"name\":\"$\\\\var{ang}^\\\\circ$\",\"color\":\"ForestGreen\",\n \"highlight\": false, \"label\": [\n \"color\":\"black\",\n \"offset\": [0, 0],\n \"distance\": 0,\n \"position\": '0.4fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]]\n ],\n [\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false],\"axis\":[\"visible\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "ang,dist": {"name": "ang,dist", "group": "Ungrouped variables", "definition": "[random(20..50),random(11..49)]", "description": "", "templateType": "anything", "can_override": false}, "angle": {"name": "angle", "group": "Ungrouped variables", "definition": "jessiecode(300,300,[-1.2,1.2,1.2,-1.2],\"\"\"\n\ncirc = circle([0,0], 1) << \n\tfixed: true, highlight: false,\n\tstrokeColor: \"black\", strokeOpacity: 0.1\n>>; \n\np = point(cos({a1}*PI/180),sin({a1}*PI/180)) <<\n\tfixed: true, highlight: false, withLabel: false, showInfoBox: false,\n\tcolor: \"black\", size: 1, strokeOpacity: 1 >>;\n\nq = point(cos(({a1}+{a2})*PI/180),sin(({a1}+{a2})*PI/180)) <<\n\tfixed: true, highlight: false, withLabel: false, showInfoBox: false,\n\tcolor: \"black\", size: 1, strokeOpacity: 1 >>;\n\norigin = point(0,0) <<\n\tfixed: true, highlight: false, withLabel: false, showInfoBox: false,\n\tcolor: \"black\", size: 1, strokeOpacity: 1 >>;\n\t\nl1 = segment(origin, p) <<\n\tfixed: true, highlight: false, \n\tcolor: \"black\", strokeWidth: 2>>; \n\t\nl2 = segment(origin, q) <<\n\tfixed: true, highlight: false, \n\tcolor: \"black\", strokeWidth: 2>>; \n\t\nang = angle(p, origin, q) << \n\tfixed: true, highlight: false,\n\twithLabel: false, color: \"SeaGreen\",\n\torthoSensitivity: -1>>;\n\n\"\"\",\n[\"axis\": false, \"pan\": [\"enabled\": false], \"zom\": [\"enabled\": false]])", "description": "", "templateType": "anything", "can_override": false}, "a1,a2": {"name": "a1,a2", "group": "Ungrouped variables", "definition": "[random([0,90,180,270]),random([120,150,210,240,300,330])]", "description": "", "templateType": "anything", "can_override": false}, "pidx": {"name": "pidx", "group": "Ungrouped variables", "definition": "random(0..7)", "description": "Index for the Pythagorean triple. The triple is real if tidx is at most 4
", "templateType": "anything", "can_override": false}, "ptha,pthb,pthc": {"name": "ptha,pthb,pthc", "group": "Ungrouped variables", "definition": "[[3,5,8,7,1,5,8,7][pidx],[4,12,15,24,2,7,12,20][pidx],[5,13,17,25,3,10,16,22][pidx]]", "description": "Elements of the Pythagorean triple
", "templateType": "anything", "can_override": false}, "y1,y2,y": {"name": "y1,y2,y", "group": "Ungrouped variables", "definition": "[random(11..69),random(11..69),random([180,180,180,180,180,180,160,170,175,185,190,200])]", "description": "Random angles $y_1,y_2,y-y_1-y_2$ which form a triangle half of the time
", "templateType": "anything", "can_override": false}, "roof": {"name": "roof", "group": "Ungrouped variables", "definition": "jsxgraph(\n 400, 200, [-10,10,10,0],\n [ \n ['segment', [[-8.5,0],[-8.5,6.2]],[\"color\":\"black\",\"withLabel\":false,\"highlight\":false,\"fixed\":true\n ]],\n ['segment', [[-8.5,6.2],[8.5,6.2]],[\"color\":\"black\",\"withLabel\":false,\"highlight\":false,\"fixed\":true\n ]],\n ['segment', [[8.5,6.2],[8.5,0]],[\"color\":\"black\",\"withLabel\":false,\"highlight\":false,\"fixed\":true\n ]],\n ['segment', [[-9,6],[0,9]],[\"color\":\"black\",\"withLabel\":false,\"highlight\":false,\"fixed\":true\n ]],\n ['segment', [[0,9],[9,6]],[\"color\":\"black\",\"withLabel\":false,\"highlight\":false,\"fixed\":true\n ]],\n \n\n \n ['segment', [[9+0.2,6+0.6],[0+0.2,9+0.6]],[\"color\":\"FireBrick\",\"highlight\":false,\"fixed\":true,\n \"firstArrow\": [\"type\": 3], \"lastArrow\": [\"type\": 3], \"dash\": 3,\n \"withLabel\": true, \"name\": \"$\\\\var{l}\\\\,\\\\mathrm{m}$\", \"label\": [\n \"fixed\":true,\n \"highlight\":false,\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.2,\n \"position\": '0.5fr right',\n \"fontSize\":18,\n \"color\": \"FireBrick\"\n ]\n ]],\n \n ['segment', [[-9.5,9],[-9.5,6]],[\"color\":\"FireBrick\",\"highlight\":false,\"fixed\":true,\n \"firstArrow\": [\"type\": 3], \"lastArrow\": [\"type\": 3], \"dash\": 3,\n \"withLabel\": true, \"name\": \"$\\\\var{h}\\\\,\\\\mathrm{m}$\", \"label\": [\n \"fixed\":true,\n \"highlight\":false,\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.4,\n \"position\": '0.5fr left',\n \"fontSize\":18,\n \"color\": \"FireBrick\"\n ]\n ]],\n \n \n ],\n [\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false],\"axis\":false]\n)", "description": "", "templateType": "anything", "can_override": false}, "l,h": {"name": "l,h", "group": "Ungrouped variables", "definition": "[random(20..25),random(6..9)]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ang,dist", "tree", "a1,a2", "angle", "pidx", "ptha,pthb,pthc", "y1,y2,y", "l,h", "roof"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Give the measurement of the angle below:
\n{angle}
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "6", "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$0^\\circ$", "$30^\\circ$", "$60^\\circ$", "$90^\\circ$", "$120^\\circ$", "$150^\\circ$", "$180^\\circ$", "$210^\\circ$", "$240^\\circ$", "$270^\\circ$", "$300^\\circ$", "$330^\\circ$"], "matrix": ["if(a2=0,1,0)", "if(a2=30,1,0)", "if(a2=60,1,0)", "if(a2=90,1,0)", "if(a2=120,1,0)", "if(a2=150,1,0)", "if(a2=180,1,0)", "if(a2=210,1,0)", "if(a2=240,1,0)", "if(a2=270,1,0)", "if(a2=300,1,0)", "if(a2=330,1,0)"], "distractors": ["", "", "", "", "", "", "", "", "", "", "", ""]}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Is is possible that a triangle has angles $\\var{y1}^\\circ$, $\\var{y2}^\\circ$ and $\\var{y-y1-y2}^\\circ$?
\n[[0]]
\nIs it possible that a right-angled triangle has side lengths $\\var{ptha}$, $\\var{pthb}$ and $\\var{pthc}$?
\n[[1]]
\n", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "angles", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["Yes", "No"], "matrix": ["if(y=180,1,0)", "if(y=180,0,1)"], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "sides", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["Yes", "No"], "matrix": ["if(pidx<=3,1,0)", "if(pidx<=3,0,1)"], "distractors": ["", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "We want to find the height of a tree. Standing at a distance of $\\var{dist}\\,\\mathrm{m}$ from the base of the tree, the angle when looking to the top of the tree is $\\var{ang}^\\circ$, as depicted below.
\n{tree}
\nIf the height of the tree is $h$ metres, then
\n[[0]]
\nand so $h=$ [[1]] $\\mathrm{m}$.
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "ratio", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "3", "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\sin(\\var{ang}^\\circ)=\\dfrac{h}{\\var{dist}}$", "$\\cos(\\var{ang}^\\circ)=\\dfrac{h}{\\var{dist}}$", "$\\tan(\\var{ang}^\\circ)=\\dfrac{h}{\\var{dist}}$", "$\\sin(\\var{ang}^\\circ)=\\dfrac{\\var{dist}}{h}$", "$\\cos(\\var{ang}^\\circ)=\\dfrac{\\var{dist}}{h}$", "$\\tan(\\var{ang}^\\circ)=\\dfrac{\\var{dist}}{h}$"], "matrix": [0, 0, "0.5", 0, 0, 0], "distractors": ["", "", "", "", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "h", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "dist*tan(radians(ang))-1", "maxValue": "dist*tan(radians(ang))+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "tonearest(dist*tan(radians(ang)),0.1)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Two wooden slats of length $\\var{l}\\,\\mathrm{m}$ are placed together at a point to form a roof with a height of $\\var{h}\\,\\mathrm{m}$.
\n{roof}
\nWhat is the angle made between the roof and the horizontal ceiling? [[0]]${}^\\circ$
", "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "degrees(arcsin(h/l))-1", "maxValue": "degrees(arcsin(h/l))+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "tonearest(degrees(arcsin(h/l)),1)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}]}, {"name": "Vectors", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", ""], "variable_overrides": [[], [], [], [], []], "questions": [{"name": "Vectors", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "Introduction to vectors using engineering notation.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Vectors are a mathematical object which describe a directional quantity such as displacement, force, or momentum. In this module we will think about vectors which live in 2-dimensional space, and in your course you may also also think about 3-dimensional vectors. Mathematicians, data scientists and physicists commonly think about vectors living in much higher dimensional spaces!
\nVectors are described by how far they extend in the $x$-direction and the $y$-direction. We use $\\vec{i}$ to represent the vector which travels one unit right (the $x$-direction), and $\\vec{j}$ for the vector which travels one unit upwards (the $y$-direction).
\n{unitvecs}
\nGeneral vectors are described as a combination of these two. For example, the vector $$5\\vec{i}-2\\vec{j}$$describes travelling $5$ units right and $2$ units down (note the negative). Play around with the following vector by clicking and dragging the endpoints, and observe how the vector changes!
\n{vector}
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"fixed": {"name": "fixed", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-5.5,5.5,5.5,-5.5],\n [\n ['point', [-2,4], [\"id\":\"start\",\"size\":0,\"withLabel\":false,\n \"fixed\":true]],\n ['point', [3,-2], [\"id\":\"end\", \"size\":0, \"withLabel\":false,\n \"fixed\":true,\"highlight\":false]],\n ['arrow', ['start','end'], [\"strokeWidth\":4,\n \"fixed\":true,\"highlight\":false,\"layer\":10,\n \"withLabel\":true,\"name\":\"$\\\\vec{s}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.8,\n \"position\": '0.5fr left',\n \"fontSize\":20,\n \"highlight\":false\n ]]],\n \n ],\n \n [\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false],\n \"DefaultAxes\":[\n \"x\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]],\n \"y\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]]\n ]]\n)", "description": "", "templateType": "anything", "can_override": false}, "unitvecs": {"name": "unitvecs", "group": "Ungrouped variables", "definition": "jsxgraph(\n 200,200, [-2.5,2.5,2.5,-2.5],\n [\n ['arrow', [[0,0],[1,0]], [\"strokeWidth\":2,\n \"fixed\":true,\"highlight\":false,\"withLabel\":true,\"name\":\"$\\\\vec{i}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1,\n \"position\": '0.5fr right',\n \"fontSize\":15,\n \"highlight\":false\n ]]\n ],\n \n ['arrow', [[0,0],[0,1]], [\"strokeWidth\":2,\n \"fixed\":true,\"highlight\":false,\"withLabel\":true,\"name\":\"$\\\\vec{j}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.4fr left',\n \"fontSize\":15,\n \"highlight\":false\n ]]\n ],\n \n ['text',[2.2,-0.2,\"$x$\"], [\n \"fontSize\":15,\"color\":\"gray\",\"fixed\":true,\"highlight\":false]],\n ['text',[0.15,2.3,\"$y$\"], [\n \"fontSize\":15,\"color\":\"gray\",\"fixed\":true,\"highlight\":false]],\n \n ],\n \n [\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false],\n \"DefaultAxes\":[\n \"x\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]],\n \"y\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]]\n ]\n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "vector": {"name": "vector", "group": "Ungrouped variables", "definition": "jessiecode(300,300,[-4.5,4.5,4.5,-4.5],safe(\"\"\"\n \n a = point(0,0) <<\n id:\"A\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n b = point(3,2) <<\n id:\"B\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n v = arrow(a,b) <<\n strokeWidth:3,highlight:false,color:\"SeaGreen\"\n >>;\n \n vx = function() {return trunc(b.X()-a.X(),1);};\n vy = function() {return trunc(b.Y() - a.Y(),1);};\n sign = function() {if (vy() < 0) {return \"\";} else {return \"+\";}};\n \n t = text(4,-4,function() {return \"$\" + vx() + \"\\\\\\\\vec{i}\" + sign() + vy() + \"\\\\\\\\vec{j}$\";}) <<\n anchorX:\"right\", anchorY:\"bottom\",\n fontSize:18, frozen:true, highlight:false\n >>;\n \n back = polygon([0.2,-3.1],[4.1,-3.1],[4.1,-4.1],[0.2,-4.1]) <<\n withLines: false, highlight: false, frozen: true,\n fillColor: \"#E8E8E8\", fillOpacity:1,\n vertices: << visible: false >>\n >>;\n \n reset = button(4.25,4.25,\"reset\",function() {\n A.X=0;A.Y=0;B.X=3;B.Y=2;\n }) <<\n anchorX:\"right\",anchorY:\"top\", fixed:true, highlight:false,\n cssStyle: \"border-radius:3px\"\n >>;\n \n \n\"\"\"),\n[\n \"showNavigation\": false,\n \"zoom\": [\"enabled\": false], pan: [\"enabled\": false],\n \"DefaultAxes\":[\n \"x\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]],\n \"y\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]]\n ]\n])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["fixed", "unitvecs", "vector"], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "If $\\vec{v}$ is the vector whose tail is at the origin $(0,0)$ and whose tip is at the point $(3,2)$, then this vector is expressed as $\\vec{v}=$ [[0]].
Hint: Press reset on the diagram to see this vector. Type i and j for $\\vec{i}$ and $\\vec{j}$.
Using the diagram, move the tail of the vector to the point $(1,2)$ and the tip to the point $(-1,3)$. The resulting vector is given by $\\vec{v}=$ [[1]].
\nNow change the vector until it equals $2.8\\vec{i}-3.1\\vec{j}$. This vector points in an approximately [[2]] direction.
\nDrag the vector by its middle. Doing this [[3]] its tip and tail positions, but [[4]] its values. This means that vectors with the same length and direction but drawn in different places on the grid [[5]].
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "v", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "3i+2j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "u", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "-2i+j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": 0, "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "1_n_2", "useCustomName": true, "customName": "direction", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["north-east", "south-east", "north-west", "south-west"], "matrix": ["0", "1", 0, 0], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "changes1", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["changes", "does not change"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "changes2", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["changes", "does not change"], "matrix": ["0", "1"], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "equal", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["are always equal", "are sometimes equal", "are never equal"], "matrix": ["1", "0", 0], "distractors": ["", "", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "{fixed}
\nThis diagram represents the displacement $\\vec{s}$ (in metres) of a robot on a factory floor. This vector $\\vec{s}$ has its tail at the point $($ [[0]] , [[1]] $)$ and its tip at the point $($ [[2]] , [[3]] $)$.
\nWe have $\\vec{s}=$ [[4]]
(Hint: how far has the robot travelled in each direction?)
?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Vector operations", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": ["question-resources/crane.svg"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Vectors can be combined by adding, subtracting and multiplying by a number. To do this, we follow the usual rules of algebra where $\\vec{i}$ and $\\vec{j}$ are treated as variables. For example, $$(2\\vec{i}+\\vec{j})+(3\\vec{i}+5\\vec{j})=5\\vec{i}+6\\vec{j}$$and$$2(4\\vec{i}-\\vec{j})=8\\vec{i}-2\\vec{j}.$$Vectors are never multiplied together. However, if you do more maths in the future you may come across two operations known as the dot product and the cross product which share some properties with multiplication.
\nGraphically, given vectors $\\vec{u}$ and $\\vec{v}$, the sum $\\vec{u}+\\vec{v}$ is drawn as follows: create a path by placing the vectors $\\vec{u}$ and $\\vec{v}$ tip-to-tail, and draw the vector from the start to the end of the path. We can also add multiple vectors together in this way.
\n{additionexample}
\nSimilarly, given a vector $\\vec{v}$, the vector $2\\vec{v}$ has the same direction but twice the length, and $-\\vec{v}=-1\\vec{v}$ has the same length but points in the opposite direction. Try dragging the tip of the vector below.
\n{scalarexample}
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"additionexample": {"name": "additionexample", "group": "Ungrouped variables", "definition": "jessiecode(300,300,[-4.5,4.5,4.5,-4.5],safe(\"\"\"\n \n a = point(-1,-3) <<\n id:\"A\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n b = point(3,2) <<\n id:\"B\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n c = point(-3,3) <<\n id:\"C\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n \n \n u = arrow(a,b) <<\n strokeWidth:3,highlight:false,color:\"SeaGreen\",\n withLabel: true, name: \"$\\\\\\\\vec{u}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.5fr right',\n highlight:false >>\n >>;\n \n v = arrow(b,c) <<\n strokeWidth:3,highlight:false,color:\"SeaGreen\",\n withLabel: true, name: \"$\\\\\\\\vec{v}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.5fr right',\n highlight:false >>\n >>;\n \n w = arrow(a,c) <<\n strokeWidth:3,highlight:false,color:\"FireBrick\",dash:3,\n withLabel: true, name: \"$\\\\\\\\vec{u}+\\\\\\\\vec{v}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.5fr left',\n highlight:false >>\n >>;\n \n \n vx = function() {return trunc(b.X()-a.X(),1);};\n vy = function() {return trunc(b.Y() - a.Y(),1);};\n sign = function() {if (vy() < 0) {return \"\";} else {return \"+\";}};\n\n\n \n \n\"\"\"),\n[\n \"showNavigation\": false, \"axis\":false,\n \"zoom\": [\"enabled\": false], pan: [\"enabled\": false]\n])", "description": "", "templateType": "anything", "can_override": false}, "crane": {"name": "crane", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-5,55,55,-5],\n [\n ['image', ['resources/question-resources/crane.svg',[-4,0], [30,50]],\n [\"fixed\":true, \"highlight\":false]],\n \n ['point', [20,30], [\"id\":\"A\",\"size\":0,\"withLabel\":false,\"fixed\":true]],\n ['point', [15,20], [\"id\":\"B\",\"size\":0,\"withLabel\":false,\"fixed\":true]],\n ['point', [20,5], [\"id\":\"C\",\"size\":0,\"withLabel\":false,\"fixed\":true]],\n ['point', [40,25], [\"id\":\"D\",\"size\":0,\"withLabel\":false,\"fixed\":true]],\n \n ['arrow', ['A','B'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{W}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.6,\n \"position\": '0.9fr right',\n \"fontSize\":15,\n \"highlight\":false\n ]\n ]],['arrow', ['A','C'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{G}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '1.0fr left',\n \"highlight\":false,\n \"fontSize\":15\n ]\n ]],['arrow', ['A','D'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{C}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.3,\n \"position\": '0.95fr left',\n \"highlight\":false,\n \"fontSize\":15\n ]\n ]],\n ],\n [\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "triangle": {"name": "triangle", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-1,6,6,-1],\n [\n ['point', [0.2,0.2], [\"id\":\"P\",\"size\":2,\"name\":\"$P$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorY\":\"top\",\n \"anchorX\":\"right\",\n \"offset\":[0,0],\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]],\n \n ['point', [4.8,2.7], [\"id\":\"Q\",\"size\":2,\"name\":\"$Q$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorY\":\"middle\",\n \"anchorX\":\"left\",\n \"offset\":[5,0],\n \"fontSize\":20,\n \"highlight\":false,\n ]\n ]],\n \n ['point', [1.5,4.8], [\"id\":\"R\",\"size\":2,\"name\":\"$R$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorY\":\"bottom\",\n \"anchorX\":\"middle\",\n \"offset\":[0,0],\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]],\n ['arrow', ['Q','R'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{a}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['arrow', ['Q', 'P'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{b}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['arrow', ['P','R'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{c}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "addition": {"name": "addition", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-1,6,6,-1],\n [\n \n ['point', [4.8,5], [\"id\":\"P\",\"size\":15,\"withLabel\":false,\n \"fixed\":false, \"showInfoBox\": false,\n \"strokeWidth\": 0, \"highlightStrokeWidth\": 0,\n \"fillOpacity\": 0, \"highlightFillOpacity\": 0.2,\n \"fillColor\": \"orange\", \"highlightFillColor\": \"orange\"]],\n \n ['point', [1.5,5], [\"id\":\"Q\",\"size\":15,\"withLabel\":false,\n \"fixed\":false, \"showInfoBox\": false,\n \"strokeWidth\": 0, \"highlightStrokeWidth\": 0,\n \"fillOpacity\": 0, \"highlightFillOpacity\": 0.2,\n \"fillColor\": \"orange\", \"highlightFillColor\": \"orange\"]],\n \n ['arrow', ['P','Q'], [\"id\":\"a\",\"strokeWidth\":3,\"withLabel\":false,\n \"fixed\":false,\"highlight\":false,\"color\":\"green\"]],\n \n ['arrow',[[0,0],[5,2]],[\"id\":\"u\",\"strokeWidth\":2,\"fixed\":false,\n \"withLabel\":true,\"name\":\"$\\\\vec{u}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]]\n ],\n \n ['arrow',[[1,1],[-0.5,3.5]],[\"id\":\"v\",\"strokeWidth\":2,\"fixed\":false,\n \"withLabel\":true,\"name\":\"$\\\\vec{v}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]]\n ]\n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "subtraction": {"name": "subtraction", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-1,6,6,-1],\n [\n \n ['point', [0,0], [\"id\":\"P\",\"size\":15,\"withLabel\":false,\n \"fixed\":false, \"showInfoBox\": false,\n \"strokeWidth\": 0, \"highlightStrokeWidth\": 0,\n \"fillOpacity\": 0, \"highlightFillOpacity\": 0.2,\n \"fillColor\": \"orange\", \"highlightFillColor\": \"orange\"]],\n \n ['point', [4,1], [\"id\":\"Q\",\"size\":15,\"withLabel\":false,\n \"fixed\":false, \"showInfoBox\": false,\n \"strokeWidth\": 0, \"highlightStrokeWidth\": 0,\n \"fillOpacity\": 0, \"highlightFillOpacity\": 0.2,\n \"fillColor\": \"orange\", \"highlightFillColor\": \"orange\"]],\n \n ['arrow', ['P','Q'], [\"id\":\"a\",\"strokeWidth\":3,\"withLabel\":false,\n \"fixed\":false,\"highlight\":false,\"color\":\"green\"]],\n \n ['arrow',[[0,5],[5,5]],[\"id\":\"u\",\"strokeWidth\":2,\"fixed\":false,\n \"withLabel\":true,\"name\":\"$\\\\vec{u}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.2,\n \"position\": '0.5fr left',\n \"fontSize\":20,\n \"highlight\":false\n ]]\n ],\n \n ['arrow',[[1,4],[4.5,2]],[\"id\":\"v\",\"strokeWidth\":2,\"fixed\":false,\n \"withLabel\":true,\"name\":\"$\\\\vec{v}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]]\n ]\n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "vectortemp": {"name": "vectortemp", "group": "Ungrouped variables", "definition": "jessiecode(300,300,[-4.5,4.5,4.5,-4.5],safe(\"\"\"\n \n a = point(0,0) <<\n id:\"A\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n b = point(3,2) <<\n id:\"B\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n v = arrow(a,b) <<\n strokeWidth:3,highlight:false,color:\"SeaGreen\"\n >>;\n \n vx = function() {return trunc(b.X()-a.X(),1);};\n vy = function() {return trunc(b.Y() - a.Y(),1);};\n sign = function() {if (vy() < 0) {return \"\";} else {return \"+\";}};\n \n t = text(4,-4,function() {return \"$\" + vx() + \"\\\\\\\\vec{i}\" + sign() + vy() + \"\\\\\\\\vec{j}$\";}) <<\n anchorX:\"right\", anchorY:\"bottom\",\n fontSize:18, frozen:true, highlight:false\n >>;\n \n back = polygon([0.2,-3.1],[4.1,-3.1],[4.1,-4.1],[0.2,-4.1]) <<\n withLines: false, highlight: false, frozen: true,\n fillColor: \"#E8E8E8\", fillOpacity:1,\n vertices: << visible: false >>\n >>;\n \n reset = button(4.25,4.25,\"reset\",function() {\n A.X=0;A.Y=0;B.X=3;B.Y=2;\n }) <<\n anchorX:\"right\",anchorY:\"top\", fixed:true, highlight:false,\n cssStyle: \"border-radius:3px\"\n >>;\n \n \n\"\"\"),\n[\n \"showNavigation\": false,\n \"zoom\": [\"enabled\": false], pan: [\"enabled\": false],\n \"DefaultAxes\":[\n \"x\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]],\n \"y\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]]\n ]\n])", "description": "", "templateType": "anything", "can_override": false}, "scalarexample": {"name": "scalarexample", "group": "Ungrouped variables", "definition": "jessiecode(300,300,[-4.5,4.5,4.5,-4.5],safe(\"\"\"\n \n\n a = point(-1,-1) <<\n size: 3, color: \"black\", showInfoBox: false, highlight: false,\n withLabel: false, fixed: true\n >>;\n \n b = point(1,1) <<\n id:\"B\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n b2 = point(\n function() {return 2*b.X()-a.X();},\n function() {return 2*b.Y()-a.Y();})\n << visible: false >>;\n \n b3 = point(\n function() {return 2*a.X()-b.X();},\n function() {return 2*a.Y()-b.Y();})\n << visible: false >>;\n \n \n \n v2 = arrow(a,b2) <<\n strokeWidth:3,highlight: false, color:\"CornflowerBlue\",\n withLabel: true, name: \"$2\\\\\\\\vec{v}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.8fr right',\n highlight: false, layer:8 >>\n >>;\n \n v = arrow(a,b) <<\n strokeWidth:3,highlight: false, color:\"SeaGreen\",\n withLabel: true, name: \"$\\\\\\\\vec{v}$\", fixed: false,\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.5fr right',\n highlight: false, layer: 12 >>\n >>;\n \n \n v3 = arrow(a,b3) <<\n strokeWidth:3,highlight:false,color:\"FireBrick\",\n withLabel: true, name: \"$-\\\\\\\\vec{v}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.2, position: '0.8fr left',\n highlight: false, layer:8 >>\n >>;\n \n\n \n \n\"\"\"),\n[\n \"showNavigation\": false, \"axis\":false,\n \"zoom\": [\"enabled\": false], pan: [\"enabled\": false]\n])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["additionexample", "crane", "triangle", "addition", "subtraction", "vectortemp", "scalarexample"], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Calculate the following expressions. Make sure to write your answers as vectors!
\n$(\\vec{i}+3\\vec{j})+(4\\vec{i}-\\vec{j})=$ [[0]]
\n$(2\\vec{i}-2\\vec{j})-(7\\vec{i}-3\\vec{j})=$ [[1]]
\n$4(\\vec{i}+\\vec{j})+3(-\\vec{i}+\\vec{j})=$ [[2]]
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "v1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "5i+2j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "v2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "-5i+j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "v3", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "i+7j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "$a\\vec{i}+b\\vec{j}$ or $a\\vec{i}-b\\vec{j}$", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "A load on the end of a crane is subject to three forces: $\\vec{G}$ due to gravity, $\\vec{W}$ due to the wind and $\\vec{C}$ due to the movement of the crane. The total force experienced by the load is $\\vec{T}=\\vec{G}+\\vec{W}+\\vec{C}$.
\n{crane}
\nWe have $\\vec{G}=-25\\vec{j}$, $\\vec{W}=$ [[0]] and $\\vec{C}=$ [[1]].
\nTherefore, the total force is the vector $\\vec{T}=$ [[2]].
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "W", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "-5i-10j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "C", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "20i-5j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "T", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "15i-40j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Given points $P$ and $Q$, the vector which starts at $P$ and ends at $Q$ is sometimes denoted $\\overline{PQ}$. In the below diagram, we have $\\overline{PQ}=-\\vec{b}$. This is vector obtained from $\\vec{b}$ by taking the negative of its components, which has the same length but points in the opposite direction to $\\vec{b}$.
\nWe have $\\vec{c}=-\\vec{b}+\\vec{a}$, because starting at $P$ and travelling backwards along $\\vec{b}$, then forwards along $\\vec{a}$, gives the same total change as $\\vec{c}$.
\n{triangle}
\nWhich of the following statements are true?
\n$\\vec{a}=\\overline{QR}$ [[0]] $\\vec{c}=\\overline{RP}$ [[1]] $\\overline{QR}=-\\overline{RQ}$ [[2]]
\n$\\vec{a}+\\vec{b}=\\vec{c}$ [[3]] $\\vec{b}+\\vec{c}=\\vec{a}$ [[4]] $\\vec{c}=\\vec{a}-\\vec{b}$ [[5]]
\n$\\overline{QR}+\\overline{RP}=\\overline{QP}$ [[6]] $\\overline{RP}-\\overline{PQ}=\\overline{QR}$ [[7]]
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "tf1", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf2", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["0", "1"], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf3", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf4", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["0", "1"], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf5", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf6", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf7", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf7", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["0", "1"], "distractors": ["", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "extension", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "interpreted_answer:\n let(\n [e1,e2], jxg_position(addition[\"P\"]),\n [f1,f2], jxg_position(addition[\"Q\"]),\n [f1-e1,f2-e2]\n )\n\ncorrect_answer:\n [3.5,4.5] // currently hard-coded\n\nmark:\n let(\n ans, interpreted_answer,\n cor, correct_answer,\n if(withintolerance(ans[0],cor[0],0.5) and withintolerance(ans[1],cor[1],0.5),correct(),incorrect())\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Rerrange the vectors so the third vector is equal to $\\vec{u}+\\vec{v}$.
\n{addition}
"}, {"type": "extension", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "interpreted_answer:\n let(\n [e1,e2], jxg_position(subtraction[\"P\"]),\n [f1,f2], jxg_position(subtraction[\"Q\"]),\n [f1-e1,f2-e2]\n )\n\ncorrect_answer:\n [1.5, 2] // currently hard-coded\n\nmark:\n let(\n ans, interpreted_answer,\n cor, correct_answer,\n if(withintolerance(ans[0],cor[0],0.5) and withintolerance(ans[1],cor[1],0.5),correct(),incorrect())\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Rearrange the vectors so the third vector is equal to $\\vec{u}-\\vec{v}$.
\n{subtraction}
"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Resolving components", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": ["question-resources/ship.svg"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Using the trig ratios, we can determine the components of vectors once we know their magnitude (represented by the length of the arrow) and their direction. In general, the steps will be to:
\nA ship travels for $50\\,\\mathrm{km}$ on a bearing of $\\theta=25^\\circ$.
\n{shipdiagram}
\nWe want to find the vector $\\vec{v}$ which represents the journey of the ship. First, we construct a right-angled triangle where two of the sides correspond to the horizontal $x$-component and vertical $y$-component of $\\vec{v}$.
\n{shipdiagramlines}
\nSince the vector $\\vec{v}$ has a length of $50$, the following trigonometric relations hold:
[[0]]
Therefore, $x=$ [[1]] $\\mathrm{km}$ and $y=$ [[2]] $\\mathrm{km}$, and so
\n$\\vec{v}=$ [[3]]
?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "A roof measures $18\\,\\mathrm{m}$ across and $3\\,\\mathrm{m}$ tall, as shown below.
\n{roof}
\nThe drawn vector is $\\vec{r}=$ [[0]]
\nBy Pythagoras' theorem, the length of $\\vec{r}$ (usually denoted $||\\vec{r}||$) is [[1]] $\\mathrm{m}$.
\nIf $\\theta$ is the angle made between the roof of the house and the ceiling, then
[[2]]
and so
[[3]]
This gives $\\theta=$ [[4]]${}^\\circ$.
\n", "gaps": [{"type": "jme", "useCustomName": true, "customName": "r", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "9i+3j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "numberentry", "useCustomName": true, "customName": "length", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "sqrt(3^2+9^2)-0.1", "maxValue": "sqrt(3^2+9^2)+0.1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "ratio", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\sin(\\theta)=\\dfrac{1}{3}$", "$\\cos(\\theta)=\\dfrac{1}{3}$", "$\\tan(\\theta)=\\dfrac{1}{3}$", "$\\tan(\\theta)=3 \\vphantom{\\dfrac 1 3}$"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "theta-choice", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\theta=\\sin^{-1}\\left(\\dfrac{1}{3}\\right)$", "$\\theta=\\cos^{-1}\\left(\\dfrac{1}{3}\\right)$", "$\\theta=\\tan^{-1}\\left(\\dfrac{1}{3}\\right)$", "$\\theta=\\tan^{-1}\\left(3\\right) \\vphantom{\\left(\\dfrac{1}{3}\\right)}$"], "matrix": [0, 0, "1", 0], "distractors": ["", "", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "theta", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "degrees(arctan(1/3))-1", "maxValue": "degrees(arctan(1/3))+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "round(degrees(arctan(1/3)))", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Force vectors", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": ["question-resources/rock.svg", "question-resources/pull.svg"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "In engineering, a useful tool for analysis are free body diagrams, where forces (and moments) are represented by vectors placed on objects. For example, if gravity acts with a force of $5\\,\\mathrm{N}$ downward, then this is represented by the vector$$\\vec{F}_{g}=-5\\vec{j}$$drawn on the body experiencing the gravity.
\nFor large forces, vectors are often not drawn to scale but are just representative.
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": false, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "A ute is pulling a large boulder off the side of the road. As the ute pulls, there is a tension force of $500\\,\\mathrm{N}$ in the rope, which points at an angle of $145^\\circ$ between the rope and the ute.
\n{image('resources/question-resources/rock.svg',30)}
\nLet $\\vec{F}$ be the force vector which has a length of $500$ and follows the direction of the rope from the boulder to the truck. We want to find $\\vec{F}$ by first drawing an right-angled triangle.
\nThe acute angle between the rope and the road is [[0]]${}^\\circ$.
\n$\\vec{F}=$ [[1]]
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "angle", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "35", "maxValue": "35", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": true, "customName": "F", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "409.57i+286.79j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "1", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "prevent"}, "valuegenerators": [{"name": "i", "value": ""}, {"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Seven friends want to play tug-of-war, with three on team $L$ pulling left and four on team $R$ pulling right. Unfortunately, they are all equally strong, giving team $R$ the advantage. To solve this problem, team $R$ splits their rope in half and pulls with an angle $\\theta$ between their halves (so they waste some of their energy pulling against each other).
\n{image('resources/question-resources/pull.svg',30)}
\nAssume everybody can pull with $100\\,\\mathrm{N}$ of force.
\nThe vector describing the direction of pulling force achieved by team $L$ is $\\vec{L}=$ [[0]].
\nIf $\\theta=50^\\circ$, then $\\vec{R}_1=$ [[1]] and $\\vec{R}_2=$ [[2]].
(hint: find a right-angled triangle for each vector)
Therefore, the total for team $R$ is $\\vec{R}=\\vec{R}_1+\\vec{R}_2=$ [[3]], so [[4]] wins.
\nThe teams will be equally matched when $\\theta=$ [[5]]${}^\\circ$.
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "L", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "-300i+0j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "i", "value": ""}, {"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "R1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "181.26i+84.52j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.1", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "i", "value": ""}, {"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "R2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "181.26i-84.52j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.1", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "i", "value": ""}, {"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "R", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "362.52i", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.2", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "i", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "1_n_2", "useCustomName": true, "customName": "winner", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["team L", "team R", "neither team"], "matrix": [0, "1", 0], "distractors": ["", "", ""]}, {"type": "numberentry", "useCustomName": true, "customName": "theta", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "2*degrees(arccos(3/4))-1", "maxValue": "2*degrees(arccos(3/4))+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Vectors Quiz", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": ["question-resources/tree.svg"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "tags": [], "metadata": {"description": "A randomised quiz covering the main topics for vectors in BLDG1022.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"fixedvector": {"name": "fixedvector", "group": "Ungrouped variables", "definition": "jsxgraph(\n 400, 400, [-5.5,5.5,5.5,-5.5],\n [\n ['point', [p1,p2], [\"id\":\"start\",\"size\":0,\"withLabel\":false,\n \"fixed\":true, \"showInfoBox\":false]],\n ['point', [q1,q2], [\"id\":\"end\", \"size\":0, \"withLabel\":false,\n \"fixed\":true,\"highlight\":false, \"showInfoBox\":false]],\n ['arrow', ['start','end'], [\"strokeWidth\":3,\n \"fixed\":true,\"highlight\":false,\"withLabel\":false\n ]],\n \n ],\n \n [\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false],\n \"defaultAxes\":[\"x\":[\"highlight\":false],\"y\":[\"highlight\":false]]]\n)", "description": "", "templateType": "anything", "can_override": false}, "p1,p2": {"name": "p1,p2", "group": "Ungrouped variables", "definition": "[random(-5..5),random(-5..5)]", "description": "Components for the fixed vector
", "templateType": "anything", "can_override": false}, "a1,a2,b1,b2,c": {"name": "a1,a2,b1,b2,c", "group": "Ungrouped variables", "definition": "[random(-9..9 except -4..4),random(2..5),random(-9..9 except -4..4),random(2..5),random(-5..5 except -1..1)]", "description": "", "templateType": "anything", "can_override": false}, "triangle": {"name": "triangle", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-1,6,6,-1],\n [\n ['point', [0.2,0.2], [\"id\":\"P\",\"size\":0,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false, \"showInfoBox\":false\n ]],\n \n ['point', [4.8,1.2], [\"id\":\"Q\",\"size\":0,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false, \"showInfoBox\":false\n ]],\n \n ['point', [1.8,4.9], [\"id\":\"R\",\"size\":0,\"withLabel\":false,\n \"fixed\":true,\"highlight\":false, \"showInfoBox\":false\n ]],\n \n ['arrow', if(uflipped,['Q','P'],['P','Q']), [\"strokeWidth\":3,\"name\":\"$\\\\vec{u}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.2,\n \"position\": if(uflipped,'0.5fr left','0.5fr right'),\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['arrow', if(vflipped,['R','Q'],['Q','R']), [\"strokeWidth\":3,\"name\":\"$\\\\vec{v}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": if(vflipped,'0.5fr left','0.5fr right'),\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['arrow', if(wflipped,['R','P'],['P','R']), [\"strokeWidth\":3,\"name\":\"$\\\\vec{w}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": if(wflipped,'0.5fr right','0.5fr left'),\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "uflipped,vflipped,wflipped": {"name": "uflipped,vflipped,wflipped", "group": "Ungrouped variables", "definition": "[random(true,false),random(true,false),random(true,false)]\n", "description": "", "templateType": "anything", "can_override": false}, "sgnu,sgnv,sgnw": {"name": "sgnu,sgnv,sgnw", "group": "Ungrouped variables", "definition": "[if(uflipped,-1,1),if(vflipped,-1,1),if(wflipped,-1,1)]", "description": "", "templateType": "anything", "can_override": false}, "q1,q2": {"name": "q1,q2", "group": "Ungrouped variables", "definition": "[random(-5..5 except p1-2..p1+2),random(-5..5 except p2-2..p2+2)]", "description": "", "templateType": "anything", "can_override": false}, "fixedvector2": {"name": "fixedvector2", "group": "Ungrouped variables", "definition": "jsxgraph(\n 400, 400, [-55,55,55,-55],\n [\n ['point', [0,50], [\"id\":\"north\",\"size\":0,\"withLabel\":false,\n \"fixed\":true, \"showInfoBox\":false]],\n ['point', [0,0], [\"id\":\"start\",\"size\":0,\"withLabel\":false,\n \"fixed\":true, \"showInfoBox\":false]],\n ['point', [{x},{y}], [\"id\":\"end\", \"size\":0, \"withLabel\":false,\n \"fixed\":true,\"highlight\":false, \"showInfoBox\":false]],\n ['arrow', ['start','end'], [\"strokeWidth\":3,\n \"fixed\":true,\"highlight\":false,\"name\":\"$d$\",\"withLabel\":true,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]],\n ['angle',['end','start','north'],[\"radius\":12,\"name\":\"$\\\\theta$\",\"color\":\"ForestGreen\",\"highlight\":false,\n \"label\": [\n \"color\":\"black\",\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]]\n \n ],\n \n [\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false],\n \"axis\":[\"highlight\":false,\"strokeOpacity\":0.25,\n \"ticks\":[\"label\":[\"opacity\":0.1]]]]\n)", "description": "", "templateType": "anything", "can_override": false}, "theta,d": {"name": "theta,d", "group": "Ungrouped variables", "definition": "[random(100..350#5 except [175,180,185,265,270,275]),random(35..50)]", "description": "", "templateType": "anything", "can_override": false}, "x,y": {"name": "x,y", "group": "Ungrouped variables", "definition": "[round(d*cos(radians(theta))),round(d*sin(radians(theta)))]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["p1,p2", "q1,q2", "fixedvector", "a1,a2,b1,b2,c", "uflipped,vflipped,wflipped", "sgnu,sgnv,sgnw", "triangle", "theta,d", "x,y", "fixedvector2"], "variable_groups": [], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Write the below vector in the form $a\\mathbf{i}+b\\mathbf{j}$: [[0]]
\n{fixedvector}
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "vec", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{q1-p1}i+{q2-p2}j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.1", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "prevent"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Calculate the value of:
\n$(\\simplify[!noLeadingMinus]{{a1} mathbf:i +{b1}mathbf:j})+\\var{c}(\\simplify[!noLeadingMinus]{{a2}mathbf:i +{b2}mathbf:j})=$$(\\simplify[!noLeadingMinus]{{a1}mathbf:i+{b1}mathbf:j})-\\var{-c}(\\simplify[!noLeadingMinus]{{a2}mathbf:i+{b2}mathbf:j})=$[[0]]
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "combined", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "{a1+c*a2}i+{b1+c*b2}j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "prevent"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "m_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "{triangle}
\nIn the above triangle, which of the vector equations are true? (Two answers are correct)
", "minMarks": 0, "maxMarks": "0", "shuffleChoices": true, "displayType": "checkbox", "displayColumns": "1", "minAnswers": "2", "maxAnswers": "2", "warningType": "prevent", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "interpretedAnswerForm": "list of list of boolean", "choices": ["$\\simplify{{sgnu}*vec:u+{sgnv}*vec:v}=\\simplify{{sgnw}*vec:w}$", "$\\simplify{{sgnu}*vec:u}=\\simplify{-{sgnv}*vec:v+{sgnw}*vec:w}$", "$\\simplify{{sgnu}*vec:u-{sgnv}*vec:v}=\\simplify{{sgnw}*vec:w}$", "$\\simplify{{sgnu}*vec:u}=\\simplify{{sgnv}*vec:v-{sgnw}*vec:w}$"], "matrix": ["0.5", "0.5", 0, 0], "distractors": ["", "", "", ""]}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "The vector $\\vec{v}=\\simplify[!noLeadingMinus]{{x}mathbf:i+{y}mathbf:j}$ is shown below.
\n{fixedvector2}
\nThe length of the vector is $d=$ [[0]] and its bearing is $\\theta=$ [[1]]${}^\\circ$.
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "d", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "sqrt(x^2+y^2)-1", "maxValue": "sqrt(x^2+y^2)+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "tonearest(sqrt(x^2+y^2),0.1)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "theta", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "switch(x<0&y>0,270+degrees(arctan(-y/x)),x<0&y<0,270-degrees(arctan(y/x)),x>0&y<0,90+degrees(arctan(-y/x)),x>0&y>0,90-degrees(arctan(y/x)))-1", "maxValue": "switch(x<0&y>0,270+degrees(arctan(-y/x)),x<0&y<0,270-degrees(arctan(y/x)),x>0&y<0,90+degrees(arctan(-y/x)),x>0&y>0,90-degrees(arctan(y/x)))+1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "tonearest(switch(x<0&y>0,270+degrees(arctan(-y/x)),x<0&y<0,270-degrees(arctan(y/x)),x>0&y<0,90+degrees(arctan(-y/x)),x>0&y>0,90-degrees(arctan(y/x))),1)", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}]}], "allowPrinting": false, "navigation": {"allowregen": false, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": true, "typeendtoleave": true, "startpassword": "", "autoSubmit": true, "allowAttemptDownload": true, "downloadEncryptionKey": "", "showresultspage": "never"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"enterreviewmodeimmediately": false, "showactualmarkwhen": "never", "showtotalmarkwhen": "never", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "never", "showexpectedanswerswhen": "never", "showadvicewhen": "never", "allowrevealanswer": true, "intro": "", "end_message": "", "results_options": {"printquestions": false, "printadvice": false}, "feedbackmessages": [], "reviewshowexpectedanswer": false, "showanswerstate": false, "reviewshowfeedback": false, "showactualmark": false, "showtotalmark": false, "reviewshowscore": false, "reviewshowadvice": false}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "extensions": ["jsxgraph", "quantities"], "custom_part_types": [{"source": {"pk": 7, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/7/edit"}, "name": "Quantity with units", "short_name": "quantity", "description": "The student enters a quantity with units.
", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nunits(correct_quantity)*abs(eval(settings[\"wiggle\"]))\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "The scalar part of the student's quantity
", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "The units of the student's quantity, before converting.
", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "The units of the student's quantity.
\nIf the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.
", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "The student's answer, interpreted as a quantity.
\nMarking fails if the student does not enter a valid quantity.
", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "Are the units of the student's quantity compatible with the units of the expected quantity?
", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "/Are the student's quantity and the expected quantity in exactly the same units?
", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.
", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "Is the student's quantity within the allowed tolerance of the expected answer?
", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "units(correct_quantity)*abs(eval(settings[\"wiggle\"]))"}, {"name": "valid_number", "description": "Is the scalar part of the student's answer a valid number?
", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units:The student enters a quantity with units. Answer accepted as correct within range defined as percentage of expected answer.
", "help_url": "https://github.com/numbas/numbas-extension-quantities", "input_widget": "string", "input_options": {"correctAnswer": "plain_string(settings[\"correctAnswer\"])", "hint": {"static": false, "value": "switch(\n settings[\"hint\"]=\"remind units\",\n \"Include units in your answer.\",\n settings[\"hint\"]=\"show units\",\n \"Give your answer in \"+units_string(settings[\"correctAnswer\"])+\" to \"+string(settings[\"wiggle\"])+\"% accuracy\"\n ,\n \"\"\n)"}, "allowEmpty": {"static": true, "value": false}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\napply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)\n\ninterpreted_answer:\nstudent_quantity\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_number:\nmatch_student_number[1]\n\nraw_student_units:\ntry(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\nstudent_units:\nif(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)\n\nstudent_quantity:\napply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\ncompatible:\nif(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)\n\ncorrect_units:\nunits(correct_quantity)\n\nsame_units:\nassert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)\n\nhas_units:\nassert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)\n\ncan_compare:\ncompatible or settings[\"incompatible_units_action\"]=\"convert\"\n\nclose_enough:\nif(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)\n\nwiggle:\nabs(eval(settings[\"wiggle\"]))*0.01*abs(settings[\"correctAnswer\"])\n\nvalid_number:\nif(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "apply(valid_number);\napply(student_quantity);\napply(has_units);\napply(compatible);\ntry(\n correctif(close_enough),\n x,\n apply(student_quantity)\n);\napply(same_units)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "student_quantity"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_number", "description": "The scalar part of the student's quantity
", "definition": "match_student_number[1]"}, {"name": "raw_student_units", "description": "The units of the student's quantity, before converting.
", "definition": "try(\n quantity(studentAnswer[len(match_student_number[0])..len(studentAnswer)]),\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "student_units", "description": "The units of the student's quantity.
\nIf the student used units incompatible with the units in the expected answer, and the \"what to do if incompatible units used\" option is set to \"mark as if correct units used\", the student's units are ignored and the expected units are used instead.
", "definition": "if(compatible(raw_student_units,correct_units) or settings[\"incompatible_units_action\"]<>\"convert\",\n raw_student_units,\n correct_units\n)"}, {"name": "student_quantity", "description": "The student's answer, interpreted as a quantity.
\nMarking fails if the student does not enter a valid quantity.
", "definition": "apply(student_units);\ntry(\n student_number * student_units,\n message,\n warn(\"Your answer is not a valid quantity.\");\n fail(\"Your answer is not a valid quantity.\")\n)"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]"}, {"name": "compatible", "description": "Are the units of the student's quantity compatible with the units of the expected quantity?
", "definition": "if(compatible(raw_student_units,correct_quantity),\n true\n,\n let(message,\"Your answer does not have the correct dimensions.\",\n if(settings[\"incompatible_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n if(settings[\"incompatible_units_action\"]=\"convert\",\n incorrect(\"Your answer does not have the correct dimensions. It will be marked as if the correct dimensions were used, and then a penalty will be applied.\")\n ,\n incorrect(\"Your answer does not have the correct dimensions.\");\n end()\n )\n );\n false\n )\n)"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)"}, {"name": "same_units", "description": "/Are the student's quantity and the expected quantity in exactly the same units?
", "definition": "assert(raw_student_units=correct_units,\n let(\n message,if(settings[\"hint\"]=\"show units\",\"You did not give your answer in \"+units_string(correct_units)+\".\", \"Your answer is not in the expected units.\"),\n switch(\n settings[\"different_units_action\"]=\"prevent\",\n warn(message);\n fail(message)\n ,\n settings[\"different_units_action\"]=\"incorrect\",\n incorrect(message); \n warn(message);\n end()\n ,\n settings[\"different_units_action\"]=\"warn\",\n warn(message);\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n settings[\"different_units_penalty\"]<1,\n multiply_credit(1-settings[\"different_units_penalty\"],message)\n ,\n false\n )\n );\n false\n)"}, {"name": "has_units", "description": "", "definition": "assert(not unitless(student_quantity),\n assert(settings[\"allow_unitless\"],\n warn(\"You must include the units in your answer.\");\n fail(\"You did not include units in your answer.\")\n )\n)"}, {"name": "can_compare", "description": "Can the student's answer be compared with the correct answer? True if compatible units used, or \"mark as if correct units used\" selected.
", "definition": "compatible or settings[\"incompatible_units_action\"]=\"convert\""}, {"name": "close_enough", "description": "Is the student's quantity within the allowed tolerance of the expected answer?
", "definition": "if(can_compare,\n student_quantity>=correct_quantity - wiggle \n and \n student_quantity<=correct_quantity + wiggle \n,\n false\n)"}, {"name": "wiggle", "description": "", "definition": "abs(eval(settings[\"wiggle\"]))*0.01*abs(settings[\"correctAnswer\"])"}, {"name": "valid_number", "description": "Is the scalar part of the student's answer a valid number?
", "definition": "if(isNaN(student_number),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n,\n true\n )\n"}], "settings": [{"name": "correctAnswer", "label": "Correct answer", "help_url": "", "hint": "The expected quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "hint", "label": "Input hint", "help_url": "", "hint": "", "input_type": "dropdown", "default_value": "remind units", "choices": [{"value": "none", "label": "None"}, {"value": "remind units", "label": "Remind to include units"}, {"value": "show units", "label": "Show required units"}]}, {"name": "allow_unitless", "label": "Allow unitless answer?", "help_url": "", "hint": "If not ticked, the student is prevented from submitting an answer without specifying units.", "input_type": "checkbox", "default_value": true}, {"name": "incompatible_units_action", "label": "What to do if incompatible units used", "help_url": "", "hint": "If the student's answer is given in units incompatible with the correct answer's units: