// Numbas version: exam_results_page_options {"name": "Energy of Photon from Frequency, Wavenumber (Joules per photon)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "tags": [], "name": "Energy of Photon from Frequency, Wavenumber (Joules per photon)", "parts": [{"showCorrectAnswer": true, "customName": "", "marks": 0, "type": "gapfill", "unitTests": [], "customMarkingAlgorithm": "student_significand (The significand as the student entered it):\n parsenumber(studentanswer[0],\"en\")\n\nsignificand_size (If student's significand is written a*10^n, 1<=a<10, this is n):\n floor(log(abs(student_significand)))\n\nstudent_exponent (The exponent as the student wrote it):\n parsenumber(studentanswer[1],\"en\")\n\nadjusted_exponent (The exponent of the student's number, taking into account the size of their significand): \n student_exponent + significand_size\n\nadjusted_significand (The student's significand, scaled into the range 1..10):\n student_significand/(10^significand_size)\n\nsignificand_feedback (Feedback on the adjusted significand: mark gap 0):\n feedback(\"Significand:\");\n let(result,apply_marking_script(\"numberentry\",string(adjusted_significand), gaps[0][\"settings\"],gaps[0][\"marks\"]),\n concat_feedback(result[\"mark\"][\"feedback\"],0.5)\n )\n\nexponent_feedback (Feedback on the adjusted exponent: mark gap 1):\n feedback(\"Exponent:\");\n let(result,apply_marking_script(\"numberentry\",string(adjusted_exponent), gaps[1][\"settings\"],gaps[1][\"marks\"]),\n concat_feedback(result[\"mark\"][\"feedback\"],0.5)\n )\n\nmark:\n apply(significand_feedback);\n apply(exponent_feedback)\n\ninterpreted_answer: [adjusted_significand, adjusted_exponent]", "scripts": {}, "gaps": [{"type": "numberentry", "unitTests": [], "correctAnswerStyle": "plain", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "showFractionHint": true, "showCorrectAnswer": true, "mustBeReducedPC": 0, "useCustomName": false, "minValue": "{Energy_mantissa2}-{Energy_mantissa2}/50", "mustBeReduced": false, "customName": "", "marks": 1, "customMarkingAlgorithm": "", "allowFractions": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxValue": "{Energy_mantissa2}+{Energy_mantissa2}/50", "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0}, {"type": "numberentry", "unitTests": [], "correctAnswerStyle": "plain", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "showFractionHint": true, "showCorrectAnswer": true, "mustBeReducedPC": 0, "useCustomName": false, "minValue": "{Energy_log}+{Energy_log}/50", "mustBeReduced": false, "customName": "", "marks": 1, "customMarkingAlgorithm": "", "allowFractions": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxValue": "{Energy_log}-{Energy_log}/50", "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0}], "variableReplacements": [], "prompt": "

Calculate (to 3 significant figures) the energy, E, of a photon of light of {Solution} {Solution_units} in {definer} in units of Joules; 

\n

[[0]] $\\times$ 10[[1]]

\n\n\n", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "useCustomName": false}], "variablesTest": {"maxRuns": "200", "condition": ""}, "variables": {"Frequency_randomiser_units": {"templateType": "anything", "name": "Frequency_randomiser_units", "group": "Ungrouped variables", "description": "", "definition": "if(Answer_2<1000,Answer_2_units,Answer_1_units)"}, "Frequency_mantissa": {"templateType": "anything", "name": "Frequency_mantissa", "group": "Ungrouped variables", "description": "", "definition": "siground(Frequency/(10^(Frequency_log)),5)"}, "Solution_units": {"templateType": "anything", "name": "Solution_units", "group": "Ungrouped variables", "description": "

\n\n\n", "definition": "if (Solution=Frequency_randomiser,Frequency_randomiser_units,wavenumber_units)"}, "Planck_mantissa": {"templateType": "anything", "name": "Planck_mantissa", "group": "Ungrouped variables", "description": "", "definition": "6.626"}, "Frequency": {"templateType": "anything", "name": "Frequency", "group": "Ungrouped variables", "description": "", "definition": "siground(random(Frequency_MW,Frequency_IR,Frequency_Visible),5)"}, "Frequency_log": {"templateType": "anything", "name": "Frequency_log", "group": "Ungrouped variables", "description": "", "definition": "floor(log(frequency))"}, "Solution": {"templateType": "anything", "name": "Solution", "group": "Ungrouped variables", "description": "", "definition": "random(Frequency_randomiser,wavenumber)"}, "Frequency_Visible": {"templateType": "anything", "name": "Frequency_Visible", "group": "Ungrouped variables", "description": "

\n", "definition": "(4.55*10^(14))+((random(1..1000))*2.95*10^(11))"}, "Frequency_list": {"templateType": "anything", "name": "Frequency_list", "group": "Ungrouped variables", "description": "", "definition": "[Frequency/1000000,Frequency/1000000000,Frequency/1000000000000]"}, "Energy_mantissa2": {"templateType": "anything", "name": "Energy_mantissa2", "group": "Ungrouped variables", "description": "", "definition": "siground(Energy_mantissa/(10^floor(log(Energy_mantissa))),3)"}, "definer": {"templateType": "anything", "name": "definer", "group": "Ungrouped variables", "description": "", "definition": "if (Solution=Frequency_randomiser,\"frequency\",\"wavenumber\")"}, "Frequency_IR": {"templateType": "anything", "name": "Frequency_IR", "group": "Ungrouped variables", "description": "", "definition": "(1.50*10^(12))+((random(1..1000))*2.99*10^(11))"}, "wavenumber": {"templateType": "anything", "name": "wavenumber", "group": "Ungrouped variables", "description": "", "definition": "siground((Frequency/30000000000),5)"}, "Frequency_randomiser": {"templateType": "anything", "name": "Frequency_randomiser", "group": "Ungrouped variables", "description": "", "definition": "if(Answer_2<1000,Answer_2,Answer_1)"}, "Answer_2": {"templateType": "anything", "name": "Answer_2", "group": "Ungrouped variables", "description": "", "definition": "(if (Frequency_list[1]<1,Frequency_list[0],Frequency_list[1]))"}, "Energy_mantissa": {"templateType": "anything", "name": "Energy_mantissa", "group": "Ungrouped variables", "description": "", "definition": "(Planck_mantissa*Frequency_mantissa)"}, "Answer_1_units": {"templateType": "anything", "name": "Answer_1_units", "group": "Ungrouped variables", "description": "", "definition": "(if (Frequency_list[2]<1,Frequency_units_list[1],Frequency_units_list[2]))"}, "Planck_log": {"templateType": "anything", "name": "Planck_log", "group": "Ungrouped variables", "description": "", "definition": "-34"}, "Answer_1": {"templateType": "anything", "name": "Answer_1", "group": "Ungrouped variables", "description": "", "definition": "(if (Frequency_list[2]<1,Frequency_list[1],Frequency_list[2]))"}, "Answer_2_units": {"templateType": "anything", "name": "Answer_2_units", "group": "Ungrouped variables", "description": "", "definition": "(if (Frequency_list[1]<1,Frequency_units_list[0],Frequency_units_list[1]))"}, "Frequency_MW": {"templateType": "anything", "name": "Frequency_MW", "group": "Ungrouped variables", "description": "", "definition": "(3*10^(8))+((random(1..1000))*3.0*10^(8))"}, "Energy_log": {"templateType": "anything", "name": "Energy_log", "group": "Ungrouped variables", "description": "", "definition": "siground(Planck_log+Frequency_log+(floor(log(Energy_mantissa))),3)"}, "wavenumber_units": {"templateType": "anything", "name": "wavenumber_units", "group": "Ungrouped variables", "description": "", "definition": "html(\"\"+\"cm\"+\"\"+\"-1\"+\"\"+\"\")"}, "Frequency_units_list": {"templateType": "anything", "name": "Frequency_units_list", "group": "Ungrouped variables", "description": "", "definition": "[\"MHz\",\"GHz\",\"THz\"]"}}, "statement": "

\n\n\n", "preamble": {"css": "", "js": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Question requires students to interchange units of Hz with MHz, GHz, THz. Question is not very efficient at present- frequencies spanning many orders of magnitude are generated by variables in a clumsy way. Could be improved by having frequency generated by a 10^((random(1000..4000)/1000) variable instead, for example. 

"}, "rulesets": {"": []}, "extensions": [], "advice": "

If presented with a wavenumber, you will need to start by converting this into a frequency while noting that; 

\n

\\[c=\\lambda\\nu\\]

\n

and therefore 

\n

\\[\\nu~{\\rm{in~s^{-1}}}=\\frac{c}{\\lambda}=c ~({\\rm in~cm~s^{-1}})~\\times~{\\rm wavenumber~(in~cm)}\\]

\n

\\[2.998 \\times 10^{10}~{\\rm cm~s^{-1}}\\times~\\var{wavenumber}~{\\rm cm^{-1}}=\\var{Frequency_randomiser}~\\var{Frequency_randomiser_units}\\]

\n

Now, we can use;

\n

\\[E=h\\nu\\]

\n

...to obtain a result in units of Joules per photon (J photon-1) where the energy (E) will be expressed in Joules (J) per photon provided that $\\nu$ is expressed in Hz and h is in J s. Note that s-1 and Hz are equivalent units;

\n

\\[ E~= {h\\nu}={\\var{Planck_mantissa} \\times 10^{\\var{Planck_log}}~{\\rm J~s}~\\times~\\var{Frequency_mantissa}~\\times~10^\\var{Frequency_log}~{\\rm s}^{-1}}=\\var{Energy_mantissa2}~\\times~10^{\\var{Energy_log}}~{\\rm J}\\]

\n

", "functions": {"": {"parameters": [], "definition": "", "language": "jme", "type": "number"}, "isotope_name": {"parameters": [["atom", "dict"]], "definition": "(\"\"+(if(atom[\"isotope\"]<>\"\",\"\"+string(atom[\"isotope\"])+\"\",\"\")+atom[\"symbol\"])+\"\")", "language": "jme", "type": "string"}, "molecule_name": {"parameters": [["atoms", "list"]], "definition": "html(join(map(isotope_name(atom),atom,atoms),\"\"))", "language": "jme", "type": "number"}}, "ungrouped_variables": ["Frequency_Visible", "Frequency_IR", "Frequency_MW", "Frequency", "Frequency_list", "Frequency_units_list", "Planck_mantissa", "Planck_log", "Frequency_mantissa", "Frequency_log", "Energy_mantissa", "Energy_mantissa2", "Energy_log", "Answer_1", "Answer_1_units", "Answer_2", "Answer_2_units", "Frequency_randomiser", "Frequency_randomiser_units", "wavenumber_units", "wavenumber", "Solution", "Solution_units", "definer"], "contributors": [{"name": "Nick Walker", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2416/"}, {"name": "Hanno Kossen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2434/"}]}]}], "contributors": [{"name": "Nick Walker", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2416/"}, {"name": "Hanno Kossen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2434/"}]}