// Numbas version: finer_feedback_settings {"name": "modulus & argument of a complex number", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "advice": "

If \\(Z={x}+{}yj\\)

\n

The modulus of \\(Z\\) is given by \\(|Z|=\\sqrt{{x}^2+{y}^2}\\)

\n

In this example \\(Z=\\var{x1}+\\var{y1}j\\)

\n

\\(|Z|=\\sqrt{\\var{x1}^2+\\var{y1}^2}=\\var{mod}\\)

\n

The argument of \\(Z\\) is defined by

\n

\\(\\theta=tan^{-1}\\left(\\frac{{y}}{{x}}\\right)\\)    if   \\(x>0\\)       and       \\(\\theta=tan^{-1}\\left(\\frac{{y}}{{x}}\\right)+\\pi\\)    if   \\(x<0\\)

\n

", "ungrouped_variables": ["x1", "y1", "theta", "mod"], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"theta": {"templateType": "anything", "group": "Ungrouped variables", "name": "theta", "definition": "if({x1}<0,arctan({y1}/{x1})+pi,arctan({y1}/{x1}))", "description": ""}, "mod": {"templateType": "anything", "group": "Ungrouped variables", "name": "mod", "definition": "sqrt({x1}^2+{y1}^2)", "description": ""}, "y1": {"templateType": "randrange", "group": "Ungrouped variables", "name": "y1", "definition": "random(0.1..5#0.2)", "description": ""}, "x1": {"templateType": "randrange", "group": "Ungrouped variables", "name": "x1", "definition": "random(-5..5#0.3)", "description": ""}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

modulus & argument of a complex number

"}, "statement": "

Given a complex number \\(Z=\\var{x1}+\\var{y1}j\\)

", "parts": [{"gaps": [{"precisionMessage": "You have not given your answer to the correct precision.", "marks": 1, "maxValue": "{theta}", "scripts": {}, "minValue": "{theta}", "type": "numberentry", "showCorrectAnswer": true, "precisionPartialCredit": 0, "variableReplacementStrategy": "originalfirst", "showPrecisionHint": true, "variableReplacements": [], "correctAnswerStyle": "plain", "precisionType": "dp", "correctAnswerFraction": false, "strictPrecision": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "precision": "2", "allowFractions": false}, {"precisionMessage": "You have not given your answer to the correct precision.", "marks": 1, "maxValue": "sqrt({x1}^2+{y1}^2)", "scripts": {}, "minValue": "sqrt({x1}^2+{y1}^2)", "type": "numberentry", "showCorrectAnswer": true, "precisionPartialCredit": 0, "variableReplacementStrategy": "originalfirst", "showPrecisionHint": true, "variableReplacements": [], "correctAnswerStyle": "plain", "precisionType": "dp", "correctAnswerFraction": false, "strictPrecision": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "precision": "2", "allowFractions": false}], "prompt": "

Calculate the modulus of the complex number

\n

\\(|Z|\\) = [[1]]

\n

Calculate the argument of \\(Z\\) 

\n

\\(arg(Z)=\\theta\\) = [[0]]

", "scripts": {}, "type": "gapfill", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": []}], "preamble": {"css": "", "js": ""}, "tags": [], "extensions": [], "variable_groups": [], "name": "modulus & argument of a complex number", "rulesets": {}, "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}