// Numbas version: exam_results_page_options {"name": "Kirchoff's Law", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"circuit": {"definition": "\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n{boundingBox: [0,13,13,0],\n axis: false,\n showNavigation: false,\n grid: true\n});\n \n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n\nvar v_source = board.createElement('circle',[[2,6],[2.5,6]],{strokeColor:'black',draft:true});\nvar p1 = board.createElement('point',[2,6.5],{name:' ',visible:false});\nvar p2 = board.createElement('point',[2,9],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{strokeColor:'black',straightFirst:false, straightLast:false});\nvar p1 = board.createElement('point',[2,5.5],{name:' ',visible:false});\nvar p2 = board.createElement('point',[2,3],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{strokeColor:'black',straightFirst:false, straightLast:false});\nvar p1 = board.createElement('point',[2,9],{name:' ',visible:false});\nvar p2 = board.createElement('point',[3,9],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{lastArrow:true,strokeColor:'black',straightFirst:false, straightLast:false});\nvar p1 = board.createElement('point',[3,9],{name:' ',visible:false});\nvar p2 = board.createElement('point',[4,9],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{strokeColor:'black',straightFirst:false, straightLast:false});\n\n\n\np1 = board.create('point',[4,8.75],{name:'',visible:false});\np2 = board.create('point',[4,9.25],{name:'',visible:false});\np3 = board.create('point',[6,9.25],{name:'',visible:false});\np4 = board.create('point',[6,8.75],{name:'',visible:false});\nboard.create('polygon',[p1,p2,p3,p4],{strokeColor:'black'});\n\nvar p1 = board.createElement('point',[6,9],{name:' ',visible:false});\nvar p2 = board.createElement('point',[10,9],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{strokeColor:'black',straightFirst:false, straightLast:false});\n\nvar p1 = board.createElement('point',[10,9],{name:' ',visible:false});\nvar p2 = board.createElement('point',[10,7],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{strokeColor:'black',straightFirst:false, straightLast:false});\n\nvar i_source_a = board.createElement('circle',[[10,6.5],[10.5,6.5]],{strokeColor:'black',draft:true});\nvar i_source_b = board.createElement('circle',[[10,6],[10.5,6]],{strokeColor:'black',draft:true});\n\nvar p1 = board.createElement('point',[10,5.5],{name:' ',visible:false});\nvar p2 = board.createElement('point',[10,3],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{strokeColor:'black',straightFirst:false, straightLast:false});\nvar p1 = board.createElement('point',[2,3],{name:' ',visible:false});\nvar p2 = board.createElement('point',[10,3],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{strokeColor:'black',straightFirst:false, straightLast:false});\n\nvar p1 = board.createElement('point',[7,9],{name:' ',visible:false});\nvar p2 = board.createElement('point',[7,7],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{strokeColor:'black',straightFirst:false, straightLast:false});\n\np1 = board.create('point',[6.75,7],{name:'',visible:false});\np2 = board.create('point',[7.25,7],{name:'',visible:false});\np3 = board.create('point',[7.25,5],{name:'',visible:false});\np4 = board.create('point',[6.75,5],{name:'',visible:false});\nboard.create('polygon',[p1,p2,p3,p4],{strokeColor:'black'});\n\nvar p1 = board.createElement('point',[7,5],{name:' ',visible:false});\nvar p2 = board.createElement('point',[7,3],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{strokeColor:'black',straightFirst:false, straightLast:false});\n\nvar p1 = board.createElement('point',[11,4.5],{name:' ',visible:false});\nvar p2 = board.createElement('point',[11,7.5],{name:' ',visible:false});\nvar line = board.createElement('line',[p1,p2],{lastArrow:true,strokeColor:'black',straightFirst:false, straightLast:false});\n\nJXG.Options.text.useMathJax = true;\n\nboard.create('text', [1, 6.5, \"+\"],{fontSize:20});\nboard.create('text', [1.1, 5.5, \"-\"],{fontSize:20});\nboard.create('text', [3, 6, \"V1\"],{fontSize:20});\nboard.create('text', [11.5, 6, \"Vx\"],{fontSize:20});\nboard.create('text', [8.7, 6, \"I1\"],{fontSize:20});\nboard.create('text', [8.5, 5.25, +I1+\"A\"],{fontSize:20});\nboard.create('text', [5.5, 6, \"R2\"],{fontSize:20});\nboard.create('text',[5,5.5,function(){return '\\\\[' +R2+ '\\\\Omega \\\\]'}],{fontSize:20});\nboard.create('text', [4.5, 10.75, \"R1\"],{fontSize:20});\nboard.create('text',[4.25,10.5,function(){return '\\\\[' +R1+ '\\\\Omega \\\\]'}],{fontSize:20});\nboard.create('text', [2.5, 10.25, \"Ix\"],{fontSize:20});\nboard.create('text', [2.25, 9.5, +Ix+\"A\"],{fontSize:20});\n\n\nreturn div;", "type": "html", "parameters": [["Ix", "number"], ["I1", "number"], ["R1", "number"], ["R2", "number"], ["V1", "number"], ["VR2", "number"]], "language": "javascript"}}, "ungrouped_variables": ["Ix", "R1", "R2", "VR2", "I1", "V1"], "name": "Kirchoff's Law", "tags": ["graphs", "jsxgraph", "Jsxgraph"], "advice": "
Find the current in $R_2$ using KCL then use Ohm's law to find $V_X$ Find $V_1$ by adding the potential drop $I_X R_1$
", "rulesets": {}, "parts": [{"prompt": "What is the voltage $V_X$ in Volts?
", "allowFractions": false, "variableReplacements": [], "maxValue": "{VR2+0.499}", "minValue": "{VR2-0.500}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "3", "type": "numberentry", "showPrecisionHint": false}, {"prompt": "What is the voltage $V_1$ in Volts?
", "allowFractions": false, "variableReplacements": [], "maxValue": "{V1+0.499}", "minValue": "{V1-0.500}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "2", "type": "numberentry", "showPrecisionHint": false}], "statement": "{circuit(Ix,I1,R1,R2,V1,VR2)}
\nFrom the above circuit, find the voltages $V_x$ and $V_1$. Give your answer to the nearest whole number.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"Ix": {"definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "Ix", "description": ""}, "R1": {"definition": "random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "R1", "description": ""}, "R2": {"definition": "random(3..12)", "templateType": "anything", "group": "Ungrouped variables", "name": "R2", "description": ""}, "VR2": {"definition": "(Ix+I1)*R2", "templateType": "anything", "group": "Ungrouped variables", "name": "VR2", "description": ""}, "I1": {"definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "I1", "description": ""}, "V1": {"definition": "VR2+(Ix*R1)", "templateType": "anything", "group": "Ungrouped variables", "name": "V1", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Martin Johnston", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/536/"}]}]}], "contributors": [{"name": "Martin Johnston", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/536/"}]}