// Numbas version: exam_results_page_options {"name": "Factorials", "feedback": {"showtotalmark": true, "advicethreshold": 0, "showanswerstate": true, "showactualmark": true, "allowrevealanswer": true}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "allQuestions": true, "shuffleQuestions": false, "percentPass": 0, "duration": 0, "pickQuestions": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "showresultspage": "oncompletion", "preventleave": true, "browse": true, "showfrontpage": true}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "exam", "questions": [], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "Factorial: x!", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}], "functions": {"show_factorial": {"definition": "var out = [];\nfor(var i=n;i>0;i--) {\n out.push(i);\n}\nvar s = new Numbas.jme.types.TString(out.join(' \\\\times '));\ns.latex = true;\nreturn s;", "type": "string", "parameters": [["n", "number"]], "language": "javascript"}}, "ungrouped_variables": ["numbers", "a", "b", "c"], "tags": [], "advice": "

$n!$ is the product of the numbers $1, \\dots, n$. You can work that out by hand, or most calculators have a factorial function, normally labelled n!.

\n

a)

\n

\\[ \\var{a}! = \\var{show_factorial(a)} = \\var{fact(a)} \\]

\n

b)

\n

\\[ \\var{b}! = \\var{show_factorial(b)} = \\var{fact(b)} \\]

\n

c)

\n

\\[ \\var{c}! = \\var{show_factorial(c)} = \\var{fact(c)} \\]

", "rulesets": {}, "parts": [{"prompt": "

$\\var{a}! = $ [[0]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "fact(a)", "minValue": "fact(a)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

$\\var{b}! = $ [[0]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "fact(b)", "minValue": "fact(b)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

$\\var{c}! = $ [[0]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "fact(c)", "minValue": "fact(c)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

Calculate the following factorials.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "numbers[0]", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "numbers[2]", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "numbers[1]", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "numbers": {"definition": "sort(shuffle(1..10)[0..3])", "templateType": "anything", "group": "Ungrouped variables", "name": "numbers", "description": ""}}, "metadata": {"notes": "", "description": "

Compute the factorials of some small numbers.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Factorial: x!/y!", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}], "functions": {"show_factorial": {"definition": "var out = [];\nfor(var i=end;i>=start;i--) {\n out.push(i);\n}\nvar s = new Numbas.jme.types.TString(out.join(' \\\\times '));\ns.latex = true;\nreturn s;", "type": "number", "parameters": [["start", "number"], ["end", "number"]], "language": "javascript"}}, "ungrouped_variables": ["a1", "a2", "b1", "b2"], "tags": [], "advice": "

a)

\n

\\[ \\frac{\\var{a1}!}{\\var{a2}!} = \\frac{\\var{show_factorial(1,a1)}}{\\var{show_factorial(1,a2)}} = \\var{show_factorial(a2+1,a1)} = \\var{fact(a1)/fact(a2)} \\]

\n

b)

\n

\\[ \\frac{\\var{b1}!}{\\var{b2}!} = \\frac{\\var{show_factorial(1,b1)}}{\\var{show_factorial(1,b2)}} = \\frac{1}{\\var{show_factorial(b1+1,b2)}} = \\frac{1}{\\var{fact(b2)/fact(b1)}} \\]

", "rulesets": {}, "parts": [{"prompt": "

$\\dfrac{\\var{a1}!}{\\var{a2}!} = $ [[0]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "fact(a1)/fact(a2)", "minValue": "fact(a1)/fact(a2)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

$\\dfrac{\\var{b1}!}{\\var{b2}!} = $ [[0]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "fact(b1)/fact(b2)", "minValue": "fact(b1)/fact(b2)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

Simplify the following fractions.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a1": {"definition": "a2+random(2..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "a2": {"definition": "random(3..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}, "b1": {"definition": "random(1..15 except a2)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "b2": {"definition": "b1+random(2..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}}, "metadata": {"notes": "", "description": "

Cancel fractions where the numerator and denominator are both factorials.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Factorial: x!/(y!*z!)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}], "functions": {"show_factorial": {"definition": "var out = [];\nfor(var i=n;i>0;i--) {\n out.push(i);\n}\nvar s = new Numbas.jme.types.TString(out.join(' \\\\times '));\ns.latex = true;\nreturn s;", "type": "string", "language": "javascript", "parameters": [["n", "number"]]}}, "ungrouped_variables": ["a1", "a2", "a3", "b1", "b2", "b3"], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

a)

\n

\\[ \\frac{\\var{a1}!}{\\var{a2}! \\times \\var{a3}!} = \\simplify[]{ {fact(a1)}/({fact(a2)}*{fact(a3)})} = \\simplify[fractionnumbers]{{fact(a1)/(fact(a2)*fact(a3))}} \\]

\n

b)

\n

\\[ \\frac{\\var{b1}!}{\\var{b2}! \\times \\var{b3}!} = \\simplify[]{ {fact(b1)}/({fact(b2)}*{fact(b3)})} = \\simplify[fractionnumbers]{{fact(b1)/(fact(b2)*fact(b3))}} \\]

", "rulesets": {}, "parts": [{"prompt": "

$\\dfrac{\\var{a1}!}{\\var{a2}!\\times\\var{a3}!}$

", "allowFractions": true, "variableReplacements": [], "maxValue": "fact(a1)/(fact(a2)*fact(a3))", "minValue": "fact(a1)/(fact(a2)*fact(a3))", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"prompt": "

$\\dfrac{\\var{b1}!}{\\var{b2}!\\times\\var{b3}!}$

", "allowFractions": true, "variableReplacements": [], "maxValue": "fact(b1)/(fact(b2)*fact(b3))", "minValue": "fact(b1)/(fact(b2)*fact(b3))", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "statement": "

Simplify the following fractions

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a1": {"definition": "a2+random(3..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "a3": {"definition": "random(2..min(a2,5))", "templateType": "anything", "group": "Ungrouped variables", "name": "a3", "description": ""}, "a2": {"definition": "random(2..15)", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}, "b1": {"definition": "b2+random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "b2": {"definition": "random(2..15)", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}, "b3": {"definition": "random(2..min(b2,5))", "templateType": "anything", "group": "Ungrouped variables", "name": "b3", "description": ""}}, "metadata": {"notes": "", "description": "

Simplify fractions involving the products of factorials.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "contributors": [{"name": "Hayley Moore", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/495/"}], "extensions": [], "custom_part_types": [], "resources": []}