// Numbas version: exam_results_page_options {"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": [{"extensions": [], "name": "David's copy of Ben's copy of Q11", "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

", "rulesets": {}, "parts": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "choices": ["

{shuffledchoices[0]}

", "

{shuffledchoices[1]}

", "

{shuffledchoices[2]}

", "

{shuffledchoices[3]}

", "

None of these

"], "displayType": "radiogroup", "maxMarks": 0, "variableReplacements": [], "showCorrectAnswer": true, "matrix": "marks", "showFeedbackIcon": true, "shuffleChoices": false, "displayColumns": 0, "minMarks": 0, "type": "1_n_2", "prompt": "

{mixed0}, {frac0}

\n

{mixed1}, {frac1}

\n

{mixed2}, {frac2}

\n

{mixed3}, {frac3}

"}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "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"], "variable_groups": [], "advice": "", "tags": [], "preamble": {"js": "", "css": ""}, "functions": {}, "variables": {"otherDen": {"name": "otherDen", "group": "Ungrouped variables", "templateType": "anything", "definition": "(x-d*y)*(y+f*z)", "description": ""}, "shuffledchoices": {"name": "shuffledchoices", "group": "Ungrouped variables", "templateType": "anything", "definition": "//the choice texts, in the shuffled order\n map(choices[j],j,order)", "description": ""}, "c": {"name": "c", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..2 except 0)", "description": ""}, "choicemarks": {"name": "choicemarks", "group": "Ungrouped variables", "templateType": "anything", "definition": "//marks to award for each of the above choices\n [1,0,0,0]", "description": ""}, "frac1": {"name": "frac1", "group": "Ungrouped variables", "templateType": "anything", "definition": "'\\$\\\\simplify{{a*x^3+b*x*y^2+c*z^3}/{otherDen}}\\$'", "description": ""}, "marks": {"name": "marks", "group": "Ungrouped variables", "templateType": "anything", "definition": "//marks to award for each choice, then append the marks for \"none of the above\"\n map(choicemarks[j],j,order)+noneofthesemarks", "description": ""}, "frac0": {"name": "frac0", "group": "Ungrouped variables", "templateType": "anything", "definition": "'\\$\\\\simplify{{a*x^3+b*x*y^2+c*z^3}/{den}}\\$'", "description": ""}, "mixed3": {"name": "mixed3", "group": "Ungrouped variables", "templateType": "anything", "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": ""}, "x": {"name": "x", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..-1)", "description": ""}, "Choice1": {"name": "Choice1", "group": "Ungrouped variables", "templateType": "anything", "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.

\n

Removing 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.

\n

Need to ensure the mixed number will not be displayed as integer next to a fraction with a numerator of 0.

"}, "frac2": {"name": "frac2", "group": "Ungrouped variables", "templateType": "anything", "definition": "'\\$\\\\simplify{{a*x^3-b*x*y^2+c*z^3}/{den}}\\$'", "description": ""}, "mixed1": {"name": "mixed1", "group": "Ungrouped variables", "templateType": "anything", "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": ""}, "frac3": {"name": "frac3", "group": "Ungrouped variables", "templateType": "anything", "definition": "'\\$\\\\simplify{{a*x^3+b*x*y^2-c*z^3}/{den}}\\$'", "description": ""}, "noneofthesemarks": {"name": "noneofthesemarks", "group": "Ungrouped variables", "templateType": "anything", "definition": "//marks to award for selecting \"none of these\"\n 0", "description": ""}, "d": {"name": "d", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..3 except 0)", "description": ""}, "choices": {"name": "choices", "group": "Ungrouped variables", "templateType": "anything", "definition": "//choices, apart from \"none of the above\"\n [Choice0,Choice1,Choice2,Choice3]", "description": ""}, "mixed2": {"name": "mixed2", "group": "Ungrouped variables", "templateType": "anything", "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": ""}, "order": {"name": "order", "group": "Ungrouped variables", "templateType": "anything", "definition": "//the order in which to display the choices - pick a random permutation of [0,1,2,3,4]\n deal(4)", "description": ""}, "y": {"name": "y", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..-1 except x except x/2)", "description": ""}, "b": {"name": "b", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..3)", "description": ""}, "f": {"name": "f", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..2 except 0)", "description": ""}, "a": {"name": "a", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..4)", "description": ""}, "z": {"name": "z", "group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..3 except -y)", "description": ""}, "choice3": {"name": "choice3", "group": "Ungrouped variables", "templateType": "anything", "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.

\n

Removing 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.

\n

Need to ensure the mixed number will not be displayed as integer next to a fraction with a numerator of 0.

"}, "Choice0": {"name": "Choice0", "group": "Ungrouped variables", "templateType": "anything", "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.

\n

Removing 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.

\n

Need to ensure the mixed number will not be displayed as integer next to a fraction with a numerator of 0.

"}, "den": {"name": "den", "group": "Ungrouped variables", "templateType": "anything", "definition": "(x+d*y)*(y+f*z)", "description": ""}, "choice2": {"name": "choice2", "group": "Ungrouped variables", "templateType": "anything", "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.

\n

Removing 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.

\n

Need to ensure the mixed number will not be displayed as integer next to a fraction with a numerator of 0.

"}, "mixed0": {"name": "mixed0", "group": "Ungrouped variables", "templateType": "anything", "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": ""}}, "variablesTest": {"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", "maxRuns": 100}, "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/"}]}