// Numbas version: exam_results_page_options {"name": "A2: Ideal gas law - Kb", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "advice": "", "functions": {}, "variablesTest": {"maxRuns": 100, "condition": "answer>0.05"}, "variables": {"advice": {"group": "Strings", "definition": "switch(switcharoo=0,\"p = N * kB * T / V\",switcharoo=1,\"V = N * kB * T / p\",switcharoo=2,\"N = p * V / (kB * T)\",switcharoo=3,\"T = p * V / (N * kB)\")", "name": "advice", "description": "", "templateType": "anything"}, "answer_text": {"group": "Ungrouped variables", "definition": "switch(\n switcharoo=0,\n \" pressure of \"+sigformat(answer,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 \"re are \"+sigformat(answer,3)+\" [x 1023] molecules\"\n ,switcharoo=3,\n \" temperature is \"+sigformat(answer,3)+\" K\"\n)", "name": "answer_text", "description": "", "templateType": "anything"}, "V": {"group": "Random Variables", "definition": "random(0.1..3.0#0.1)", "name": "V", "description": "", "templateType": "anything"}, "advice_kb_string": {"group": "Strings", "definition": "if(m_l_switch=0,siground(kb*10^23,3)+\" \\\\times 10^\\{-23\\}\",siground(kb*10^26,3)+\" \\\\times 10^\\{-26\\}\")", "name": "advice_kb_string", "description": "", "templateType": "anything"}, "VV": {"group": "Answer Values", "definition": "n*Kb*t/p", "name": "VV", "description": "", "templateType": "anything"}, "explanation": {"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", "description": "", "templateType": "anything"}, "advice2": {"group": "Strings", "definition": "switch(\n switcharoo=0,\n \"$p = \\\\frac\\{\"+molecule_string+\" * \"+advice_kb_string+\" * \"+sigformat(T,3)+\"\\}\\{\"+sigformat(V,3)+\"}$\"\n ,switcharoo=1,\n \"$V = \\\\frac\\{\"+molecule_string+\" * \"+advice_kb_string+\" * \"+sigformat(T,3)+\"\\}\\{\"+sigformat(p,3)+\"}$\"\n ,switcharoo=2,\n \"$n = \\\\frac\\{\"+sigformat(p,3)+\" * \"+sigformat(V,3)+\"\\}\\{(\"+molecule_string+\" * \"+sigformat(T,3)+\")}$\"\n ,switcharoo=3,\n \"$T = \\\\frac\\{\"+sigformat(p,3)+\" * \"+sigformat(V,3)+\"\\}\\{(\"+molecule_string+\" * \"+advice_kb_string+\")}$\"\n)", "name": "advice2", "description": "", "templateType": "anything"}, "p": {"group": "Random Variables", "definition": "if(m_l_switch=0,random(10000..300000#10000),random(0.01..3.00#0.01))", "name": "p", "description": "", "templateType": "anything"}, "TT": {"group": "Answer Values", "definition": "p*V/(n*kB)", "name": "TT", "description": "", "templateType": "anything"}, "p_string": {"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", "description": "", "templateType": "anything"}, "a_string": {"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 molecules in the gas, in units of [x 10$^\\{23\\}$] molecules,\"\n ,switcharoo=3,\n \"temperature of the gas in Kelvin\"\n)", "name": "a_string", "description": "", "templateType": "anything"}, "N": {"group": "Random Variables", "definition": "random(0.1..10.0#0.1)*10^23", "name": "N", "description": "", "templateType": "anything"}, "T": {"group": "Random Variables", "definition": "random(100..800)", "name": "T", "description": "", "templateType": "anything"}, "nn": {"group": "Answer Values", "definition": "p*V/(Kb*T)", "name": "nn", "description": "", "templateType": "anything"}, "Kb": {"group": "Constants", "definition": "if(m_l_switch=0,1.38*10^-23,1.36*10^-26)", "name": "Kb", "description": "", "templateType": "anything"}, "switcharoo": {"group": "Random Variables", "definition": "random(0..3)", "name": "switcharoo", "description": "", "templateType": "anything"}, "k_c_switch": {"group": "Random Variables", "definition": "random(0,1)", "name": "k_c_switch", "description": "", "templateType": "anything"}, "t_string": {"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", "description": "", "templateType": "anything"}, "m_l_switch": {"group": "Random Variables", "definition": "random(0,1)", "name": "m_l_switch", "description": "", "templateType": "anything"}, "pp": {"group": "Answer Values", "definition": "n*Kb*T/V", "name": "pp", "description": "", "templateType": "anything"}, "v_string": {"group": "Strings", "definition": "if(switcharoo<>1,\"with a volume of \"+dpformat(v,2)+if(m_l_switch=0,\" m3\",\" L\"),\"\")", "name": "v_string", "description": "", "templateType": "anything"}, "n_string": {"group": "Strings", "definition": "if(switcharoo<>2,\"There are \"+dpformat(n/(1*10^23),2)+\" x 1023 molecules in the gas.\",\"\")", "name": "n_string", "description": "", "templateType": "anything"}, "answer": {"group": "Ungrouped variables", "definition": "switch(switcharoo=0,pp,switcharoo=1,VV,switcharoo=2,nn/(10^(23)),switcharoo=3,TT)", "name": "answer", "description": "", "templateType": "anything"}, "molecule_string": {"group": "Strings", "definition": "siground(n/10^precround(log(n,10)-1,0),4)+\" \\\\times 10^\\{\"+precround(log(n,10)-1,0)+\"\\}\"", "name": "molecule_string", "description": "", "templateType": "anything"}, "advice_latex": {"group": "Strings", "definition": "switch(\n switcharoo=0,\n \"$p = \\\\frac\\{N k_B T\\}\\{V\\}$\"\n ,switcharoo=1,\n \"$V = \\\\frac\\{N k_B T\\}\\{p\\}$\"\n ,switcharoo=2,\n \"$N = \\\\frac\\{p V\\}\\{k_B T\\}$\"\n ,switcharoo=3,\n \"$T = \\\\frac\\{p V\\}\\{n k_B\\}$\"\n)", "name": "advice_latex", "description": "", "templateType": "anything"}, "Kb_string": {"group": "Strings", "definition": "if(m_l_switch=0,dpformat(kb*(1*10^23),2)+\" x 10-23 J K-1\",dpformat(kb*(1*10^26),2)+\" x 10-26 L atm K-1\")", "name": "Kb_string", "description": "", "templateType": "anything"}, "answer_txt2": {"group": "Ungrouped variables", "definition": "if(\n switcharoo=2,\n \"x 1023\"\n ,\n \"\"\n)", "name": "answer_txt2", "description": "", "templateType": "anything"}}, "name": "A2: Ideal gas law - Kb", "preamble": {"css": "", "js": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A simple ideal gas law question, using number of molecules, 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. As such the boltzmann constant is in either J/K or L atm/K.

"}, "rulesets": {}, "extensions": [], "parts": [{"variableReplacementStrategy": "originalfirst", "precision": "3", "precisionPartialCredit": "50", "mustBeReduced": false, "maxValue": "siground(answer,3)+(siground(abs(answer),3)*0.01)", "precisionType": "sigfig", "scripts": {}, "customMarkingAlgorithm": "", "minValue": "siground(answer,3)-(siground(abs(answer),3)*0.01)", "type": "numberentry", "variableReplacements": [], "strictPrecision": true, "showPrecisionHint": false, "unitTests": [], "notationStyles": ["plain", "en", "si-en"], "prompt": "

Calculate the {a_string} to three significant figures.

", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "showFeedbackIcon": true, "marks": "2", "showCorrectAnswer": false, "correctAnswerFraction": false, "precisionMessage": "You have not given your answer to the correct precision.", "mustBeReducedPC": 0}], "variable_groups": [{"variables": ["p", "N", "T", "V", "switcharoo", "m_l_switch", "k_c_switch"], "name": "Random Variables"}, {"variables": ["Kb"], "name": "Constants"}, {"variables": ["explanation", "pp", "VV", "nn", "TT"], "name": "Answer Values"}, {"variables": ["a_string", "p_string", "v_string", "n_string", "t_string", "Kb_string", "advice", "advice2", "molecule_string", "advice_latex", "advice_kb_string"], "name": "Strings"}], "ungrouped_variables": ["answer", "answer_text", "answer_txt2"], "statement": "

A container {v_string} holds an ideal gas{p_string}. {n_string} {t_string} Assuming a value for kB of {kb_string}.

", "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/"}]}