// Numbas version: exam_results_page_options {"name": "Custom constants", "metadata": {"description": "

A few questions showing how to use custom constants in different contexts.

", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "j instead of i for the imaginary unit", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "tags": [], "metadata": {"description": "

In this question, the imaginary unit $\\sqrt{-1}$ is written as $j$ instead of $i$.

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

\\begin{align}
\\mathrm{j} &= \\sqrt{-1} \\\\[1em]
z_1 &= \\var{z1} \\\\[1em]
z_2 &= \\var{z2}
\\end{align}

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": false}, "constants": [{"name": "j", "value": "sqrt(-1)", "tex": "\\mathrm{j}"}], "variables": {"z1,z2": {"name": "z1,z2", "group": "Ungrouped variables", "definition": "repeat(\n random(-5..5) + random(-5..5 except 0)*j,\n 2\n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["z1,z2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is $z_1 \\times z_2$?

\n

Try {z1*z2} and {re(z1*z2)} {if(im(z1*z2)<0,'-','+')} {abs(im(z1*z2))}*i.

", "answer": "{z1*z2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "i,j,k are unit vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "tags": [], "metadata": {"description": "

The letters i, j and k are used to represent the standard 3D unit vectors.

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

$\\mathbf{v_1} = \\simplify{i + z*k}$.

\n

$\\mathbf{v_2} = \\simplify{{a}i + {b}j + {c}k}$.

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": false}, "constants": [{"name": "i", "value": "vector(1,0,0)", "tex": "\\mathbf{\\hat i}"}, {"name": "j", "value": "vector(0,1,0)", "tex": "\\mathbf{\\hat j}"}, {"name": "k", "value": "vector(0,0,1)", "tex": "\\mathbf{\\hat k}"}], "variables": {"a,b,c": {"name": "a,b,c", "group": "Ungrouped variables", "definition": "shuffle(-5..5)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a,b,c"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is $\\mathbf{v}_1 + \\mathbf{v}_2$?

\n

Write your answer in terms of the unit vectors $\\var{i}$, $\\var{j}$ and $\\var{k}$.

", "answer": "{1+a}i + {b}j + ({c}+z)k", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "z", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "$\\tau$ for the circle constant", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "tags": [], "metadata": {"description": "

In this question, $\\tau$ represents the ratio of a circle's radius to its circumference, or $2\\pi$.

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

$\\tau = 2\\pi$.

\n

Here's a random multiple of $\\tau$: $\\var{multiple_of_tau}$.

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [{"name": "tau", "value": "2pi", "tex": "\\tau"}], "variables": {"p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "

The period of the function in part a is $\\tau / p$.

", "templateType": "anything", "can_override": false}, "multiple_of_tau": {"name": "multiple_of_tau", "group": "Ungrouped variables", "definition": "random(3..9)tau", "description": "

An integer multiple of $\\tau$, to show

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["p", "multiple_of_tau"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the period of the function $\\simplify{sin({p}x)}$?

\n

Try tau/{p} or 2pi/{p}

", "answer": "tau/{p}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": [], "custom_part_types": [], "resources": []}