// Numbas version: exam_results_page_options {"name": "Ideal gas law - R", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"js": "", "css": ""}, "tags": [], "name": "Ideal gas law - R", "ungrouped_variables": ["answer", "answer_text"], "variables": {"n_string": {"templateType": "anything", "description": "", "definition": "if(switcharoo<>2,\"There are \"+dpformat(n,1)+\" moles of gas.\",\"\")", "group": "Strings", "name": "n_string"}, "pp": {"templateType": "anything", "description": "", "definition": "n*R*T/V", "group": "Answer Values", "name": "pp"}, "k_c_switch": {"templateType": "anything", "description": "", "definition": "random(0,1)", "group": "Random Variables", "name": "k_c_switch"}, "R": {"templateType": "anything", "description": "", "definition": "if(m_l_switch=0,8.31,0.082)", "group": "Constants", "name": "R"}, "switcharoo": {"templateType": "anything", "description": "", "definition": "random(0..3)", "group": "Random Variables", "name": "switcharoo"}, "p": {"templateType": "anything", "description": "", "definition": "if(m_l_switch=0,random(10000..300000#10000),random(0.01..3.00#0.01))", "group": "Random Variables", "name": "p"}, "answer": {"templateType": "anything", "description": "", "definition": "switch(switcharoo=0,pp,switcharoo=1,VV,switcharoo=2,nn,switcharoo=3,TT)", "group": "Ungrouped variables", "name": "answer"}, "m_l_switch": {"templateType": "anything", "description": "", "definition": "random(0,1)", "group": "Random Variables", "name": "m_l_switch"}, "advice": {"templateType": "anything", "description": "", "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)", "group": "Strings", "name": "advice"}, "r_string": {"templateType": "anything", "description": "", "definition": "R+\" \"+if(m_l_switch=0,\"J mol-1 K-1\",\"L atm K-1 mol-1\")", "group": "Strings", "name": "r_string"}, "VV": {"templateType": "anything", "description": "", "definition": "n*r*t/p", "group": "Answer Values", "name": "VV"}, "TT": {"templateType": "anything", "description": "", "definition": "p*V/(n*R)", "group": "Answer Values", "name": "TT"}, "answer_text": {"templateType": "anything", "description": "", "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)", "group": "Ungrouped variables", "name": "answer_text"}, "v_string": {"templateType": "anything", "description": "", "definition": "if(switcharoo<>1,\"with a volume of \"+dpformat(v,2)+if(m_l_switch=0,\" m3\",\" L\"),\"\")", "group": "Strings", "name": "v_string"}, "explanation": {"templateType": "anything", "description": "", "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\"", "group": "Answer Values", "name": "explanation"}, "advice_latex": {"templateType": "anything", "description": "", "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)", "group": "Strings", "name": "advice_latex"}, "nn": {"templateType": "anything", "description": "", "definition": "p*V/(R*T)", "group": "Answer Values", "name": "nn"}, "V": {"templateType": "anything", "description": "", "definition": "random(0.1..3.0#0.1)", "group": "Random Variables", "name": "V"}, "p_string": {"templateType": "anything", "description": "", "definition": "if(switcharoo<>0,\" with a pressure of \"+if(m_l_switch=0,dpformat(p/1000,0)+\" kPa\",dpformat(p,2)+\" atm\"),\"\")", "group": "Strings", "name": "p_string"}, "T": {"templateType": "anything", "description": "", "definition": "random(100..800)", "group": "Random Variables", "name": "T"}, "n": {"templateType": "anything", "description": "", "definition": "random(0.1..15.0#0.1)", "group": "Random Variables", "name": "n"}, "advice2": {"templateType": "anything", "description": "", "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)", "group": "Strings", "name": "advice2"}, "a_string": {"templateType": "anything", "description": "", "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)", "group": "Strings", "name": "a_string"}, "t_string": {"templateType": "anything", "description": "", "definition": "if(switcharoo<>3,\"The gas has a temperature of \"+if(k_c_switch,dpformat(t,0)+' K',dpformat(t-273,0)+' $^\\{\\\\circ\\}$C')+\".\",\"\")", "group": "Strings", "name": "t_string"}}, "parts": [{"showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "correctAnswerStyle": "plain", "mustBeReduced": false, "strictPrecision": true, "maxValue": "siground(answer,3)+(siground(abs(answer),3)*0.01)", "customMarkingAlgorithm": "", "correctAnswerFraction": false, "marks": "2", "precision": "3", "precisionType": "sigfig", "showPrecisionHint": true, "minValue": "siground(answer,3)-(siground(abs(answer),3)*0.01)", "extendBaseMarkingAlgorithm": true, "mustBeReducedPC": 0, "variableReplacements": [], "type": "numberentry", "prompt": "

Calculate the {a_string} to three significant figures.

", "scripts": {}, "precisionPartialCredit": "50", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "showCorrectAnswer": true, "precisionMessage": "You have not given your answer to the correct precision."}], "functions": {}, "advice": "

Re-arrange $pV = nRT$

\n

to become: {advice_latex}

\n

{advice2} = {sigformat(answer,3)}

\n

And so the {answer_text}.

", "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"}], "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"}, "variablesTest": {"maxRuns": 100, "condition": "answer>0.05"}, "statement": "

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

", "extensions": [], "rulesets": {}, "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/"}]}