// Numbas version: finer_feedback_settings {"name": "from polar to Cartesian form", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "from polar to Cartesian form", "tags": [], "metadata": {"description": "
Cartesian form of a complex number.
", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "Write the complex number $z=\\var{r} \\mathrm{e}^{\\var{frac}}$ in Cartesian form $a+bi$, by calculating $a$ and $b$.
", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"theta": {"name": "theta", "group": "Ungrouped variables", "definition": "pi*pq[0]/pq[1]", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "r*cos(theta)", "description": "", "templateType": "anything", "can_override": false}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "r*sin(theta)", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "rational(theta/pi)", "description": "", "templateType": "anything", "can_override": false}, "e": {"name": "e", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything", "can_override": false}, "ex": {"name": "ex", "group": "Ungrouped variables", "definition": "if(pq[0]=1 and pq[1]=1, \"{r}*e^(i*pi)\", if(pq[0]=1, \"{r}*e^(i*pi/{pq[1]})\", \"{r}*e^(i*{pq[0]}pi/{pq[1]})\"))", "description": "", "templateType": "anything", "can_override": false}, "pq": {"name": "pq", "group": "Ungrouped variables", "definition": "random([[1,6],\n [1,4],\n [1,3],\n [1,2],\n [2,3],\n [3,4],\n [5,6],\n [1,1]\n])", "description": "", "templateType": "anything", "can_override": false}, "frac": {"name": "frac", "group": "Ungrouped variables", "definition": "if(pq[0]=1 and pq[1]=1, expression(\"pi\"), if(pq[0]=1, expression(\"pi/{pq[1]}\"), expression(\"{pq[0]}pi/{pq[1]}\")))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["pq", "theta", "r", "a", "b", "t", "e", "ex", "frac"], "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, "exploreObjective": null, "prompt": "$a=$ [[0]] (Enter your answer to 3 decimal places)
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "a-e", "maxValue": "a+e", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": 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, "exploreObjective": null, "prompt": "$b=$ [[0]](Enter your answer to 3 decimal places)
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "b-e", "maxValue": "b+e", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Guillermo Pineda", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/20075/"}], "resources": []}]}], "contributors": [{"name": "Guillermo Pineda", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/20075/"}]}