// Numbas version: exam_results_page_options {"name": "Ideal gas law - Kb", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Ideal gas law - Kb", "tags": [], "metadata": {"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.

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

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

", "advice": "

Re-arrange $pV = N k_B T$

\n

to become: {advice_latex}

\n

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

\n

And so the{answer_text}.

", "rulesets": {}, "extensions": [], "variables": {"molecule_string": {"name": "molecule_string", "group": "Strings", "definition": "siground(n/10^precround(log(n,10)-1,0),4)+\" \\\\times 10^\\{\"+precround(log(n,10)-1,0)+\"\\}\"", "description": "", "templateType": "anything"}, "t_string": {"name": "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')+\".\",\"\")", "description": "", "templateType": "anything"}, "v_string": {"name": "v_string", "group": "Strings", "definition": "if(switcharoo<>1,\"with a volume of \"+dpformat(v,2)+if(m_l_switch=0,\" m3\",\" L\"),\"\")", "description": "", "templateType": "anything"}, "TT": {"name": "TT", "group": "Answer Values", "definition": "p*V/(n*kB)", "description": "", "templateType": "anything"}, "V": {"name": "V", "group": "Random Variables", "definition": "random(0.1..3.0#0.1)", "description": "", "templateType": "anything"}, "advice_kb_string": {"name": "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\\}\")", "description": "", "templateType": "anything"}, "explanation": {"name": "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\"", "description": "", "templateType": "anything"}, "T": {"name": "T", "group": "Random Variables", "definition": "random(100..800)", "description": "", "templateType": "anything"}, "advice": {"name": "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)\")", "description": "", "templateType": "anything"}, "N": {"name": "N", "group": "Random Variables", "definition": "random(0.1..10.0#0.1)*10^23", "description": "", "templateType": "anything"}, "answer_text": {"name": "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)", "description": "", "templateType": "anything"}, "advice2": {"name": "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)", "description": "", "templateType": "anything"}, "p_string": {"name": "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\"),\"\")", "description": "", "templateType": "anything"}, "pp": {"name": "pp", "group": "Answer Values", "definition": "n*Kb*T/V", "description": "", "templateType": "anything"}, "Kb": {"name": "Kb", "group": "Constants", "definition": "if(m_l_switch=0,1.38*10^-23,1.36*10^-26)", "description": "", "templateType": "anything"}, "VV": {"name": "VV", "group": "Answer Values", "definition": "n*Kb*t/p", "description": "", "templateType": "anything"}, "m_l_switch": {"name": "m_l_switch", "group": "Random Variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "Kb_string": {"name": "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\")", "description": "", "templateType": "anything"}, "answer_txt2": {"name": "answer_txt2", "group": "Ungrouped variables", "definition": "if(\n switcharoo=2,\n \"x 1023\"\n ,\n \"\"\n)", "description": "", "templateType": "anything"}, "p": {"name": "p", "group": "Random Variables", "definition": "if(m_l_switch=0,random(10000..300000#10000),random(0.01..3.00#0.01))", "description": "", "templateType": "anything"}, "a_string": {"name": "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)", "description": "", "templateType": "anything"}, "k_c_switch": {"name": "k_c_switch", "group": "Random Variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "n_string": {"name": "n_string", "group": "Strings", "definition": "if(switcharoo<>2,\"There are \"+dpformat(n/(1*10^23),2)+\" x 1023 molecules in the gas.\",\"\")", "description": "", "templateType": "anything"}, "nn": {"name": "nn", "group": "Answer Values", "definition": "p*V/(Kb*T)", "description": "", "templateType": "anything"}, "advice_latex": {"name": "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)", "description": "", "templateType": "anything"}, "answer": {"name": "answer", "group": "Ungrouped variables", "definition": "switch(switcharoo=0,pp,switcharoo=1,VV,switcharoo=2,nn/(10^(23)),switcharoo=3,TT)", "description": "", "templateType": "anything"}, "switcharoo": {"name": "switcharoo", "group": "Random Variables", "definition": "random(0..3)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "answer>0.05", "maxRuns": 100}, "ungrouped_variables": ["answer", "answer_text", "answer_txt2"], "variable_groups": [{"name": "Random Variables", "variables": ["p", "N", "T", "V", "switcharoo", "m_l_switch", "k_c_switch"]}, {"name": "Constants", "variables": ["Kb"]}, {"name": "Answer Values", "variables": ["explanation", "pp", "VV", "nn", "TT"]}, {"name": "Strings", "variables": ["a_string", "p_string", "v_string", "n_string", "t_string", "Kb_string", "advice", "advice2", "molecule_string", "advice_latex", "advice_kb_string"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the {a_string} to three significant figures.

", "minValue": "siground(answer,3)-(siground(abs(answer),3)*0.01)", "maxValue": "siground(answer,3)+(siground(abs(answer),3)*0.01)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": "50", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}]}