// Numbas version: finer_feedback_settings {"name": "David's copy of Ben's copy of Q11", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a", "b", "c", "d", "f", "x", "y", "z", "den", "otherDen", "frac0", "mixed0", "Choice0", "frac1", "mixed1", "Choice1", "frac2", "mixed2", "choice2", "frac3", "mixed3", "choice3", "choices", "noneofthesemarks", "choicemarks", "marks", "shuffledchoices", "order"], "variables": {"mixed0": {"name": "mixed0", "group": "Ungrouped variables", "definition": "'\\$\\\\var{trunc((a*x^3+b*x*y^2+c*z^3)/den)}\\\\simplify{{mod(abs(a*x^3+b*x*y^2+c*z^3),abs(den))}/{abs(den)}}\\$'", "description": "", "templateType": "anything"}, "shuffledchoices": {"name": "shuffledchoices", "group": "Ungrouped variables", "definition": "//the choice texts, in the shuffled order\n map(choices[j],j,order)", "description": "", "templateType": "anything"}, "Choice1": {"name": "Choice1", "group": "Ungrouped variables", "definition": "if(abs((a*x^3+b*x*y^2+c*z^3)/otherden)>1 and random(0,1,2)<>0 and mod(a*x^3+b*x*y^2+c*z^3,otherden)<>0, \n mixed1,frac1)", "description": "
Need to make sure the fraction is eligible to be written as a mixed number.
\nRemoving the random statement will mean each improper fraction is displayed as a mixed numeral. You could also adjust the random call to change the probability of an improper fraction to be displayed as a mixed number.
\nNeed to ensure the mixed number will not be displayed as integer next to a fraction with a numerator of 0.
", "templateType": "anything"}, "frac2": {"name": "frac2", "group": "Ungrouped variables", "definition": "'\\$\\\\simplify{{a*x^3-b*x*y^2+c*z^3}/{den}}\\$'", "description": "", "templateType": "anything"}, "otherDen": {"name": "otherDen", "group": "Ungrouped variables", "definition": "(x-d*y)*(y+f*z)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-2..2 except 0)", "description": "", "templateType": "anything"}, "choice3": {"name": "choice3", "group": "Ungrouped variables", "definition": "if(abs((a*x^3+b*x*y^2-c*z^3)/den)>1 and random(0,1,2)<>0 and mod(a*x^3+b*x*y^2-c*z^3,den)<>0, mixed3,frac3)", "description": "Need to make sure the fraction is eligible to be written as a mixed number.
\nRemoving the random statement will mean each improper fraction is displayed as a mixed numeral. You could also adjust the random call to change the probability of an improper fraction to be displayed as a mixed number.
\nNeed to ensure the mixed number will not be displayed as integer next to a fraction with a numerator of 0.
", "templateType": "anything"}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "random(-3..-1)", "description": "", "templateType": "anything"}, "choicemarks": {"name": "choicemarks", "group": "Ungrouped variables", "definition": "//marks to award for each of the above choices\n [1,0,0,0]", "description": "", "templateType": "anything"}, "choice2": {"name": "choice2", "group": "Ungrouped variables", "definition": "if(abs((a*x^3-b*x*y^2+c*z^3)/den)>1 and random(0,1,2)<>0 and mod(a*x^3-b*x*y^2+c*z^3,den)<>0, mixed2,frac2)", "description": "Need to make sure the fraction is eligible to be written as a mixed number.
\nRemoving the random statement will mean each improper fraction is displayed as a mixed numeral. You could also adjust the random call to change the probability of an improper fraction to be displayed as a mixed number.
\nNeed to ensure the mixed number will not be displayed as integer next to a fraction with a numerator of 0.
", "templateType": "anything"}, "order": {"name": "order", "group": "Ungrouped variables", "definition": "//the order in which to display the choices - pick a random permutation of [0,1,2,3,4]\n deal(4)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything"}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(-2..2 except 0)", "description": "", "templateType": "anything"}, "mixed3": {"name": "mixed3", "group": "Ungrouped variables", "definition": "'\\$\\\\var{trunc((a*x^3+b*x*y^2-c*z^3)/den)}\\\\simplify{{mod(abs(a*x^3+b*x*y^2-c*z^3),abs(den))}/{abs(den)}}\\$'", "description": "", "templateType": "anything"}, "frac0": {"name": "frac0", "group": "Ungrouped variables", "definition": "'\\$\\\\simplify{{a*x^3+b*x*y^2+c*z^3}/{den}}\\$'", "description": "", "templateType": "anything"}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "random(-3..-1 except x except x/2)", "description": "", "templateType": "anything"}, "choices": {"name": "choices", "group": "Ungrouped variables", "definition": "//choices, apart from \"none of the above\"\n [Choice0,Choice1,Choice2,Choice3]", "description": "", "templateType": "anything"}, "frac3": {"name": "frac3", "group": "Ungrouped variables", "definition": "'\\$\\\\simplify{{a*x^3+b*x*y^2-c*z^3}/{den}}\\$'", "description": "", "templateType": "anything"}, "z": {"name": "z", "group": "Ungrouped variables", "definition": "random(1..3 except -y)", "description": "", "templateType": "anything"}, "Choice0": {"name": "Choice0", "group": "Ungrouped variables", "definition": "if(abs((a*x^3+b*x*y^2+c*z^3)/den)>1 and random(0,1,2)<>0 and mod(a*x^3+b*x*y^2+c*z^3,den)<>0,\n mixed0,frac0)", "description": "Need to make sure the fraction is eligible to be written as a mixed number.
\nRemoving the random statement will mean each improper fraction is displayed as a mixed numeral. You could also adjust the random call to change the probability of an improper fraction to be displayed as a mixed number.
\nNeed to ensure the mixed number will not be displayed as integer next to a fraction with a numerator of 0.
", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "mixed1": {"name": "mixed1", "group": "Ungrouped variables", "definition": "'\\$\\\\var{trunc((a*x^3+b*x*y^2+c*z^3)/otherden)}\\\\simplify{{mod(abs(a*x^3+b*x*y^2+c*z^3),abs(otherden))}/{abs(otherden)}}\\$'", "description": "", "templateType": "anything"}, "noneofthesemarks": {"name": "noneofthesemarks", "group": "Ungrouped variables", "definition": "//marks to award for selecting \"none of these\"\n 0", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "templateType": "anything"}, "marks": {"name": "marks", "group": "Ungrouped variables", "definition": "//marks to award for each choice, then append the marks for \"none of the above\"\n map(choicemarks[j],j,order)+noneofthesemarks", "description": "", "templateType": "anything"}, "mixed2": {"name": "mixed2", "group": "Ungrouped variables", "definition": "'\\$\\\\var{trunc((a*x^3-b*x*y^2+c*z^3)/den)}\\\\simplify{{mod(abs(a*x^3-b*x*y^2+c*z^3),abs(den))}/{abs(den)}}\\$'", "description": "", "templateType": "anything"}, "frac1": {"name": "frac1", "group": "Ungrouped variables", "definition": "'\\$\\\\simplify{{a*x^3+b*x*y^2+c*z^3}/{otherDen}}\\$'", "description": "", "templateType": "anything"}, "den": {"name": "den", "group": "Ungrouped variables", "definition": "(x+d*y)*(y+f*z)", "description": "", "templateType": "anything"}}, "variable_groups": [], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "name": "David's copy of Ben's copy of Q11", "extensions": [], "preamble": {"css": "", "js": ""}, "advice": "", "statement": "The value of $\\large\\simplify{({a}x^3+{b}x*y^2+{c}z^3)/((x+{d}y)(y+{f}z))}$ when $x = \\var{x}$, $y= \\var{y}$ and $z = \\var{z}$ is
", "variablesTest": {"maxRuns": 100, "condition": "x+d*y<>0 &\ny-f*z<>0 &\nz-f*y<>0 &\ny+f*z<>0 &\nx^3+b*x*y^2+c*z^3<>0"}, "functions": {}, "parts": [{"minMarks": 0, "showCorrectAnswer": true, "matrix": "marks", "type": "1_n_2", "scripts": {}, "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "prompt": "{mixed0}, {frac0}
\n{mixed1}, {frac1}
\n{mixed2}, {frac2}
\n{mixed3}, {frac3}
", "showFeedbackIcon": true, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "marks": 0, "variableReplacements": [], "choices": ["{shuffledchoices[0]}
", "{shuffledchoices[1]}
", "{shuffledchoices[2]}
", "{shuffledchoices[3]}
", "None of these
"]}], "type": "question", "contributors": [{"name": "David Wishart", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1461/"}]}]}], "contributors": [{"name": "David Wishart", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1461/"}]}