// Numbas version: exam_results_page_options {"name": "A2: Ideal gas law - R", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": [], "tags": [], "variablesTest": {"condition": "answer>0.05", "maxRuns": 100}, "ungrouped_variables": ["answer", "answer_text"], "rulesets": {}, "parts": [{"mustBeReducedPC": 0, "correctAnswerStyle": "plain", "type": "numberentry", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": false, "allowFractions": false, "unitTests": [], "correctAnswerFraction": false, "showCorrectAnswer": false, "showFeedbackIcon": true, "maxValue": "siground(answer,3)+(siground(abs(answer),3)*0.01)", "prompt": "

Calculate the {a_string} to three significant figures.

", "precision": "3", "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "variableReplacements": [], "precisionPartialCredit": "50", "strictPrecision": true, "mustBeReduced": false, "precisionType": "sigfig", "variableReplacementStrategy": "originalfirst", "marks": "2", "scripts": {}, "minValue": "siground(answer,3)-(siground(abs(answer),3)*0.01)"}], "name": "A2: Ideal gas law - R", "advice": "", "metadata": {"description": "

A simple ideal gas law question, that asks the student to calculate one of the four variables. he question can ask for either L atm, or kPa m3, and either K or C for temp.

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

A container {v_string} holds an ideal gas{p_string}. {n_string} {t_string} Assume a value for R of {r_string}.

", "variable_groups": [{"variables": ["p", "n", "T", "V", "switcharoo", "m_l_switch", "k_c_switch"], "name": "Random Variables"}, {"variables": ["R"], "name": "Constants"}, {"variables": ["explanation", "pp", "VV", "nn", "TT"], "name": "Answer Values"}, {"variables": ["a_string", "p_string", "v_string", "n_string", "t_string", "r_string", "advice", "advice_latex", "advice2"], "name": "Strings"}], "variables": {"VV": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "n*r*t/p", "name": "VV"}, "T": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(100..800)", "name": "T"}, "answer_text": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "switch(\n switcharoo=0,\n \"pressure of \"+sigformat(p,3)+\" \"+if(m_l_switch=0,\" Pa\",\" atm\")\n ,switcharoo=1,\n \"volume is \"+sigformat(answer,3)+if(m_l_switch=0,\" m3\",\" L\")\n ,switcharoo=2,\n \"number of moles is \"+sigformat(answer,3)\n ,switcharoo=3,\n \"temperature is \"+sigformat(answer,3)+\" K\"\n)", "name": "answer_text"}, "answer": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "switch(switcharoo=0,pp,switcharoo=1,VV,switcharoo=2,nn,switcharoo=3,TT)", "name": "answer"}, "r_string": {"description": "", "templateType": "anything", "group": "Strings", "definition": "R+\" \"+if(m_l_switch=0,\"J mol-1 K-1\",\"L atm K-1 mol-1\")", "name": "r_string"}, "n": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(0.1..15.0#0.1)", "name": "n"}, "advice": {"description": "", "templateType": "anything", "group": "Strings", "definition": "switch(\n switcharoo=0,\n \"p = (n R T) / V\"\n ,switcharoo=1,\n \"V = (n R T) / p\"\n ,switcharoo=2,\n \"n = (p V) / (R T)\"\n ,switcharoo=3,\n \"T = (p V) / (n R)\"\n)", "name": "advice"}, "V": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(0.1..3.0#0.1)", "name": "V"}, "TT": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "p*V/(n*R)", "name": "TT"}, "explanation": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "\"so here, we calculate each of the five values based on the other four random versions, and then we can randomly decide which of the five is used for the question\"", "name": "explanation"}, "R": {"description": "", "templateType": "anything", "group": "Constants", "definition": "if(m_l_switch=0,8.31,0.082)", "name": "R"}, "pp": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "n*R*T/V", "name": "pp"}, "advice_latex": {"description": "", "templateType": "anything", "group": "Strings", "definition": "switch(\n switcharoo=0,\n \"$p = \\\\frac\\{n R T\\}\\{V\\}$\"\n ,switcharoo=1,\n \"$V = \\\\frac\\{n R T\\}\\{p\\}$\"\n ,switcharoo=2,\n \"$n = \\\\frac\\{p V\\}\\{R T\\}$\"\n ,switcharoo=3,\n \"$T = \\\\frac\\{p V\\}\\{n R\\}$\"\n)", "name": "advice_latex"}, "t_string": {"description": "", "templateType": "anything", "group": "Strings", "definition": "if(switcharoo<>3,\"The gas has a temperature of \"+if(k_c_switch,dpformat(t,0)+' K',dpformat(t-273,0)+' $^\\{\\\\circ\\}$C')+\".\",\"\")", "name": "t_string"}, "switcharoo": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(0..3)", "name": "switcharoo"}, "p_string": {"description": "", "templateType": "anything", "group": "Strings", "definition": "if(switcharoo<>0,\" with a pressure of \"+if(m_l_switch=0,dpformat(p/1000,0)+\" kPa\",dpformat(p,2)+\" atm\"),\"\")", "name": "p_string"}, "k_c_switch": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(0,1)", "name": "k_c_switch"}, "n_string": {"description": "", "templateType": "anything", "group": "Strings", "definition": "if(switcharoo<>2,\"There are \"+dpformat(n,1)+\" moles of gas.\",\"\")", "name": "n_string"}, "m_l_switch": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(0,1)", "name": "m_l_switch"}, "v_string": {"description": "", "templateType": "anything", "group": "Strings", "definition": "if(switcharoo<>1,\"with a volume of \"+dpformat(v,2)+if(m_l_switch=0,\" m3\",\" L\"),\"\")", "name": "v_string"}, "nn": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "p*V/(R*T)", "name": "nn"}, "p": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "if(m_l_switch=0,random(10000..300000#10000),random(0.01..3.00#0.01))", "name": "p"}, "advice2": {"description": "", "templateType": "anything", "group": "Strings", "definition": "switch(\n switcharoo=0,\n \"$p = \\\\frac\\{\"+sigformat(n,3)+\" * \"+R+\" * \"+sigformat(T,3)+\"\\}\\{\"+sigformat(V,3)+\"}$\"\n ,switcharoo=1,\n \"$V = \\\\frac\\{\"+sigformat(n,3)+\" * \"+R+\" * \"+sigformat(T,3)+\"\\}\\{\"+sigformat(p,3)+\"}$\"\n ,switcharoo=2,\n \"$n = \\\\frac\\{\"+sigformat(p,3)+\" * \"+sigformat(V,3)+\"\\}\\{(\"+R+\" * \"+sigformat(T,3)+\")}$\"\n ,switcharoo=3,\n \"$T = \\\\frac\\{\"+sigformat(p,3)+\" * \"+sigformat(V,3)+\"\\}\\{(\"+sigformat(n,3)+\" * \"+R+\")}$\"\n)", "name": "advice2"}, "a_string": {"description": "", "templateType": "anything", "group": "Strings", "definition": "switch(\n switcharoo=0,\n \"pressure of the gas in \"+if(m_l_switch=0,\"Pascals\",\" Atmospheres\")\n ,switcharoo=1,\n \"volume of the gas in \" +if(m_l_switch=0,\" cubic Meters\",\" Litres\")\n ,switcharoo=2,\n \"number of moles in the gas\"\n ,switcharoo=3,\n \"temperature of the gas in Kelvin\"\n)", "name": "a_string"}}, "functions": {}, "preamble": {"js": "", "css": ""}, "type": "question", "contributors": [{"name": "Tom Stallard", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/841/"}]}]}], "contributors": [{"name": "Tom Stallard", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/841/"}]}