// Numbas version: exam_results_page_options {"name": "Ideal kinetic gas law", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": [], "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["answer", "answer2", "answer_text", "answer_txt2"], "rulesets": {}, "parts": [{"mustBeReducedPC": 0, "correctAnswerStyle": "plain", "type": "numberentry", "precisionMessage": "You have not given your answer to the correct precision.", "showPrecisionHint": true, "allowFractions": false, "unitTests": [], "correctAnswerFraction": false, "showCorrectAnswer": true, "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": "Ideal kinetic gas law", "advice": "

Re-arrange {advice}

\n

to become: {advice_latex}

\n

{advice3}

\n

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

\n

{advice4}

\n

And so the{answer_text}.

", "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.

\n

pV = 1/3 Nm<v2>

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

A container {v_string} holds an ideal gas{p_string}. {n_string} {m_string} {smv_string}

", "variable_groups": [{"variables": ["p", "N", "n23", "T", "V", "rms_vel", "ms_vel", "switcharoo", "m_l_switch", "k_c_switch", "m", "m23"], "name": "Random Variables"}, {"variables": ["explanation", "pp", "VV", "nn23", "nn", "mm23", "mm", "mmssvv", "rrmmssvv", "kb"], "name": "Answer Values"}, {"variables": ["a_string", "p_string", "v_string", "n_string", "m_string", "smv_string", "advice", "advice2", "advice3", "advice4", "advice_latex"], "name": "Strings"}], "variables": {"switcharoo": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(0..4)", "name": "switcharoo"}, "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(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 \" mass of each molecule is \"+sigformat(answer,3)+\" [x 10-23] kg\"\n ,switcharoo=4,\n \" root-mean-squared velocity of molecules in the gas is \"+sigformat(answer,3)+\" m/s\"\n)", "name": "answer_text"}, "answer": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "switch(\n switcharoo=0,pp,\n switcharoo=1,VV,\n switcharoo=2,nn,\n switcharoo=3,mm,\n switcharoo=4,rrmmssvv\n)", "name": "answer"}, "rrmmssvv": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "sqrt(mmssvv)", "name": "rrmmssvv"}, "VV": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "(1/3)*n23*m23*ms_vel/p", "name": "VV"}, "ms_vel": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "rms_vel^2", "name": "ms_vel"}, "mm23": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "3*p*V/(N23*ms_vel)", "name": "mm23"}, "advice": {"description": "", "templateType": "anything", "group": "Strings", "definition": "\"$pV = 1/3 N m <v^2>$\"", "name": "advice"}, "n23": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "n*10^23", "name": "n23"}, "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"}, "N": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(1.1..9.9#0.1 except 1)", "name": "N"}, "advice3": {"description": "", "templateType": "anything", "group": "Strings", "definition": "if(\n switcharoo<>4,\n \"$<v^2> = \\\\bigg(\\\\sqrt\\{<v^2>\\}\\\\bigg)^2 = \\\\big( \"+rms_vel+\" \\\\big)^2$ = \"+ms_vel,\" \"\n)", "name": "advice3"}, "pp": {"description": "

pV=1/3 Nm ms_vel

\n

p

", "templateType": "anything", "group": "Answer Values", "definition": "(1/3)*n23*m23*ms_vel/V", "name": "pp"}, "answer_txt2": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(\n switcharoo=2,\n \"x 1023\"\n ,\n \"\"\n)+\nif(\n switcharoo=3,\n \"x 10-23\"\n ,\n \"\"\n)", "name": "answer_txt2"}, "advice_latex": {"description": "

switch(
  switcharoo=0,\"p= 1/3 * N * m * &lt;v&gt;<sup>2</sup> / V\",
  switcharoo=1,\"V = 1/3 * N * m * &lt;v&gt;<sup>2</sup> / p\",
  switcharoo=2,\"N = 3 * p * V / (m * &lt;v&gt;<sup>2</sup>)\",
  switcharoo=3,\"m = 3 * p * V / (N * &lt;v&gt;<sup>2</sup>)\",
  switcharoo=4,\"&lt;v&gt;<sup>2</sup> = 3 * p * V / (N * m)\"
)

", "templateType": "anything", "group": "Strings", "definition": "switch(\n switcharoo=0,\n \"$p = \\\\frac\\{N m <v^2>\\}\\{3 V\\}$\"\n ,switcharoo=1,\n \"$V = \\\\frac\\{N m <v^2>\\}\\{3 p\\}$\"\n ,switcharoo=2,\n \"$N = \\\\frac\\{3 p V\\}\\{m <v^2>\\}$\"\n ,switcharoo=3,\n \"$m = \\\\frac\\{3 p V\\}\\{N <v^2>\\}$\"\n ,switcharoo=4,\n \"$T = \\\\frac\\{3 p V\\}\\{N m\\}$\"\n)", "name": "advice_latex"}, "nn23": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "3*p*V/(m23*ms_vel)", "name": "nn23"}, "smv_string": {"description": "", "templateType": "anything", "group": "Strings", "definition": "if(switcharoo<>4,\"The root-mean-square velocity of the molecules in the gas is \"+rms_vel+\" m/s.\",\" \")", "name": "smv_string"}, "m_string": {"description": "", "templateType": "anything", "group": "Strings", "definition": "if(switcharoo<>3,\"The mass of each molecule is \"+dpformat(m,2)+\" x 10-23 kg.\",\"\")", "name": "m_string"}, "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"}, "mm": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "mm23*10^23", "name": "mm"}, "advice4": {"description": "

  \"$\\\\sqrt\\{&lt;v^2&gt;\\} = SQRT(&lt;v^2&gt;) = \\\\sqrt\\{\"+answer2+\"}) = \"+answer,\" \"

", "templateType": "anything", "group": "Strings", "definition": "if(\n switcharoo=4, \n \"$\\\\sqrt\\{<v^2>\\} = \\\\sqrt\\{\"+sigformat(answer2,5)+\"}) = $\"+sigformat(answer,5),\" \"\n\n)", "name": "advice4"}, "k_c_switch": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "0", "name": "k_c_switch"}, "m23": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "m*10^(-23)", "name": "m23"}, "nn": {"description": "

pV=1/3 Nm ms_vel

\n

N = 3pV/(m*ms_vel)

", "templateType": "anything", "group": "Answer Values", "definition": "nn23/10^23", "name": "nn"}, "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"}, "m_l_switch": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "0", "name": "m_l_switch"}, "answer2": {"description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "switch(\n switcharoo=0,pp,\n switcharoo=1,VV,\n switcharoo=2,nn,\n switcharoo=3,mm,\n switcharoo=4,mmssvv\n)", "name": "answer2"}, "p": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "if(m_l_switch=0,random(10000..300000#10000),random(0.01..3.00#0.01 except 1))", "name": "p"}, "m": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(1.1..9.9)", "name": "m"}, "mmssvv": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "3*p*V/(m23*N23)", "name": "mmssvv"}, "advice2": {"description": "

switch(
  switcharoo=0,\"p= 1/3 * N * m * &lt;v&gt;<sup>2</sup> / V\",
  switcharoo=1,\"V = 1/3 * N * m * &lt;v&gt;<sup>2</sup> / p\",
  switcharoo=2,\"N = 3 * p * V / (m * &lt;v&gt;<sup>2</sup>)\",
  switcharoo=3,\"m = 3 * p * V / (N * &lt;v&gt;<sup>2</sup>)\",
  switcharoo=4,\"&lt;v&gt;<sup>2</sup> = 3 * p * V / (N * m)\"
)

", "templateType": "anything", "group": "Strings", "definition": "switch(\n switcharoo=0,\n \"$p = \\\\frac\\{\"+sigformat(N,3)+\"\\\\times10^\\{23\\} \\\\times \"+sigformat(m,3)+\"\\\\times10^\\{-23\\} \\\\times \"+sigformat(ms_vel,3)+\"\\}\\{3 * \"+sigformat(V,3)+\"\\}$\"\n ,switcharoo=1,\n \"$V = \\\\frac\\{\"+sigformat(N,3)+\"\\\\times10^\\{23\\} \\\\times \"+sigformat(m,3)+\"\\\\times10^\\{-23\\} \\\\times \"+sigformat(ms_vel,3)+\"\\}\\{3 * \"+sigformat(p,3)+\"\\}$\"\n ,switcharoo=2,\n \"$N = \\\\frac\\{3 \\\\times \"+sigformat(p,3)+\" \\\\times \"+sigformat(V,3)+\"\\}\\{\"+sigformat(m,3)+\"\\\\times10^\\{-23\\} \\\\times \"+sigformat(ms_vel,3)+\"\\}$\"\n ,switcharoo=3,\n \"$m = \\\\frac\\{3 \\\\times \"+sigformat(p,3)+\" \\\\times \"+sigformat(V,3)+\"\\}\\{\"+sigformat(N,3)+\"\\\\times10^\\{23\\} \\\\times \"+ms_vel+\"\\}$\"\n ,switcharoo=4,\n \"$<v^2> = \\\\frac\\{3 \\\\times \"+sigformat(p,3)+\" \\\\times \"+sigformat(V,3)+\"\\}\\{\"+sigformat(N,3)+\"\\\\times10^\\{23\\} \\\\times \"+sigformat(m,3)+\"\\\\times10^\\{-23\\}\\}$\"\n)", "name": "advice2"}, "n_string": {"description": "", "templateType": "anything", "group": "Strings", "definition": "if(switcharoo<>2,\"There are \"+dpformat(n,2)+\" x 1023 molecules in the gas.\",\"\")", "name": "n_string"}, "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 molecules in the gas, in units of [x 10$^\\{23\\}$] molecules,\"\n ,switcharoo=3,\n \"mass of each individual molecule, in units of [x 10$^\\{-23\\}$] kg,\"\n ,switcharoo=4,\n \"root-mean-square velocity (from the mean-square velocity in m/s) of the gas,\"\n)", "name": "a_string"}, "V": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(0.1..3.0#0.1 except 1)", "name": "V"}, "kb": {"description": "", "templateType": "anything", "group": "Answer Values", "definition": "1", "name": "kb"}, "rms_vel": {"description": "", "templateType": "anything", "group": "Random Variables", "definition": "random(50..250)", "name": "rms_vel"}}, "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/"}]}