// Numbas version: exam_results_page_options {"showQuestionGroupNames": false, "duration": 0, "timing": {"timeout": {"message": "", "action": "none"}, "allowPause": true, "timedwarning": {"message": "", "action": "none"}}, "metadata": {"licence": "None specified", "description": ""}, "feedback": {"showactualmark": true, "intro": "", "advicethreshold": 0, "showanswerstate": true, "feedbackmessages": [], "allowrevealanswer": true, "showtotalmark": true}, "percentPass": 0, "navigation": {"onleave": {"message": "", "action": "none"}, "showfrontpage": true, "preventleave": true, "allowregen": true, "browse": true, "showresultspage": "oncompletion", "reverse": true}, "name": "Introductory Maths for analytical chemistry", "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "Find the equation of a line through two points - positive gradient", "extensions": ["jsxgraph"], "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": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}], "statement": "

In this question we will identify the equation of the straight line passing through points  $A=(\\var{xa},\\var{ya})$ and  $B=(\\var{xb},\\var{yb})$ in the form $y = mx + c$.

\n

{plotPoints()}

", "variables": {"m": {"name": "m", "description": "", "definition": "(ya-yb)/(xa-xb)", "templateType": "anything", "group": "Ungrouped variables"}, "yb": {"name": "yb", "description": "", "definition": "ya+random([2,4])", "templateType": "anything", "group": "Ungrouped variables"}, "xa": {"name": "xa", "description": "", "definition": "random(-4..-1)", "templateType": "anything", "group": "Ungrouped variables"}, "ya": {"name": "ya", "description": "", "definition": "random(-4..2)", "templateType": "anything", "group": "Ungrouped variables"}, "xb": {"name": "xb", "description": "", "definition": "xa+random([2,4] except -xa)", "templateType": "anything", "group": "Ungrouped variables"}, "c": {"name": "c", "description": "", "definition": "ya-m*xa", "templateType": "anything", "group": "Ungrouped variables"}}, "metadata": {"description": "

Use two points on a line graph to calculate the gradient and $y$-intercept and hence the equation of the straight line running through both points.

\n

The answer box for the third part plots the function which allows the student to check their answer against the graph before submitting.

\n

This particular example has a positive gradient.

", "licence": "Creative Commons Attribution 4.0 International"}, "tags": ["gradient", "graphs", "line equation", "Straight Line", "straight line", "taxonomy", "y-intercept"], "variablesTest": {"maxRuns": 100, "condition": "\n"}, "variable_groups": [], "ungrouped_variables": ["xa", "xb", "ya", "yb", "m", "c"], "advice": "

We find the equation of a straight line passing through two points by finding the gradient and the $y$-intercept of the line.

\n

a)

\n

We can find the gradient ($m$) using the points $A = (x_1,y_1)=(\\var{xa},\\var{ya})$ and $B = (x_2,y_2)=(\\var{xb},\\var{yb})$.

\n

As the definition of gradient is the ratio of vertical change ($y_2-y_1$) to horizontal change ($x_2-x_1$).
The equation for gradient is,

\n

\\begin{align}
m &= \\frac{y_2-y_1}{x_2-x_1} \\\\[0.5em]
&= \\frac{\\simplify[!collectNumbers]{{yb}-{ya}}}{\\simplify[!collectNumbers]{{xb}-{xa}}} \\\\[0.5em]
&= \\frac{\\simplify[]{{yb}-{ya}}}{\\simplify{{xb}-{xa}}} \\\\[0.5em]
&= \\simplify[simplifyFractions,unitDenominator]{({yb-ya})/({xb-xa})}\\text{.}
\\end{align}

\n

b)

\n

Rearranging the equation $y=mx+c$ and substituting either of the points gives

\n

\\[c = y_1-mx_1 \\quad \\mathrm{or} \\quad c = y_2-mx_2 \\,\\text{.} \\]

\n

We can then also use this equation with the other point's coordinates to check our answer.

\n

Let's use point $A$ first:

\n

\\[
\\begin{align}
c &= y_1-mx_1 \\\\
&= \\var{ya}-\\var[fractionnumbers]{m}\\times\\var{xa} \\\\
& = \\simplify[fractionnumbers]{{ya-m*xa}}\\text{.}
\\end{align}
\\]

\n

We then check this against point $B$:

\n

\\[
\\begin{align}
y_2 &= mx_2 + c \\\\[0.5em]
&= \\simplify[fractionNumbers]{{m}{xb}+{c}} \\\\[0.5em]
&= \\var[fractionnumbers]{m*xb+c}\\text{.}
\\end{align}
\\]

\n

c)

\n

We can now substitute these values for $m$ and $c$ into $y=mx+c$  to get:

\n

\\[y=\\simplify[!noLeadingMinus,fractionNumbers,unitFactor]{{m} x+ {c}}\\text{.}\\]

\n

The green line drawn on the graph represents the above line equation.

\n

{correctPoints()}

", "preamble": {"css": "", "js": ""}, "parts": [{"showCorrectAnswer": true, "customMarkingAlgorithm": "", "prompt": "

Calculate the gradient, $m$, of the straight line between these two points.

\n

$m=$ [[0]]

\n

", "unitTests": [], "scripts": {}, "adaptiveMarkingPenalty": 0, "showFeedbackIcon": true, "type": "gapfill", "marks": 0, "gaps": [{"correctAnswerFraction": true, "unitTests": [], "scripts": {}, "adaptiveMarkingPenalty": 0, "correctAnswerStyle": "plain", "minValue": "m", "marks": 1, "mustBeReducedPC": 0, "useCustomName": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "showFractionHint": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowFractions": true, "mustBeReduced": false, "showFeedbackIcon": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "customName": "", "maxValue": "m", "variableReplacementStrategy": "originalfirst"}], "useCustomName": false, "customName": "", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "sortAnswers": false}, {"showCorrectAnswer": true, "customMarkingAlgorithm": "", "prompt": "

Use this gradient and the coordinates of the points to calculate the $y$-intercept, $c$.

\n

$c=$ [[0]]

", "unitTests": [], "scripts": {}, "adaptiveMarkingPenalty": 0, "showFeedbackIcon": true, "type": "gapfill", "marks": 0, "gaps": [{"correctAnswerFraction": false, "unitTests": [], "scripts": {}, "adaptiveMarkingPenalty": 0, "correctAnswerStyle": "plain", "minValue": "c", "marks": 1, "mustBeReducedPC": 0, "useCustomName": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "showFractionHint": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowFractions": false, "mustBeReduced": false, "showFeedbackIcon": true, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "customName": "", "maxValue": "c", "variableReplacementStrategy": "originalfirst"}], "useCustomName": false, "customName": "", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "sortAnswers": false}, {"showCorrectAnswer": true, "customMarkingAlgorithm": "", "prompt": "

Give the equation of the straight line through these points in the form $y=mx+c$. 

\n

$\\displaystyle y=$ [[0]]

\n

Use the graph to plot your answer and check that it goes through these points.

", "unitTests": [], "scripts": {"mark": {"order": "after", "script": "this.question.lines.l.setAttribute({strokeColor: this.credit==1 ? 'green' : 'red'});\nthis.question.lines.c.setAttribute({visible: this.credit==1});\n"}}, "adaptiveMarkingPenalty": 0, "showFeedbackIcon": true, "type": "gapfill", "marks": 0, "gaps": [{"showPreview": true, "vsetRangePoints": 5, "scripts": {}, "unitTests": [], "checkingType": "absdiff", "vsetRange": [0, 1], "failureRate": 1, "answerSimplification": "fractionNumbers", "useCustomName": false, "answer": "{m}*x+{c}", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "notallowed": {"message": "

You must input your answer in the form y = mx +c where m and c are numbers.

", "showStrings": false, "partialCredit": 0, "strings": ["c", "m"]}, "checkVariableNames": true, "checkingAccuracy": 0.001, "adaptiveMarkingPenalty": 0, "showFeedbackIcon": true, "type": "jme", "valuegenerators": [{"name": "x", "value": ""}], "customName": "", "marks": 1, "variableReplacementStrategy": "originalfirst"}], "useCustomName": false, "customName": "", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "sortAnswers": false}], "functions": {"correctPoints": {"type": "html", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[Math.min(-1,xa-2),Math.max(2,yb+2,c+1),Math.max(2,xb+2),Math.min(-1,ya-2,c-1)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n\nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: true, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\n\n\nquestion.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\n//define ans as this \ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;", "parameters": [], "language": "javascript"}, "plotPoints": {"type": "html", "definition": "//point coordinate variables\nvar xa = Numbas.jme.unwrapValue(scope.variables.xa);\nvar xb = Numbas.jme.unwrapValue(scope.variables.xb);\nvar ya = Numbas.jme.unwrapValue(scope.variables.ya);\nvar yb = Numbas.jme.unwrapValue(scope.variables.yb);\nvar m = Numbas.jme.unwrapValue(scope.variables.m);\nvar c = Numbas.jme.unwrapValue(scope.variables.c);\n\n//make board\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[Math.min(-1,xa-2),Math.max(2,yb+2,c+1),Math.max(2,xb+2),Math.min(-1,ya-2,c-1)],grid: true});\nvar board = div.board;\nquestion.board = board;\n\n//points (with nice colors)\nvar a = board.create('point',[xa,ya],{name: 'A', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow', fixed: true, showInfobox: true});\nvar b = board.create('point',[xb,yb],{name: 'B', size: 7, fillColor: 'blue' , strokeColor: 'lightblue' , highlightFillColor: 'lightblue', highlightStrokeColor: 'yellow',fixed: true, showInfobox: true});\n\n\n//ans(was tree) is defined at the end and nscope looks important\n//but they're both variables\n var ans;\n var nscope = new Numbas.jme.Scope([scope,{variables:{x:new Numbas.jme.types.TNum(0)}}]);\n//this is the beating heart of whatever plots the function,\n//I've changed this from being curve to functiongraph\n var line = board.create('functiongraph',[function(x){\nif(ans) {\n try {\nnscope.variables.x.value = x;\n var val = Numbas.jme.evaluate(ans,nscope).value;\n return val;\n }\n catch(e) {\nreturn 13;\n }\n}\nelse\n return 13;\n },-12,12]\n , {strokeColor:\"blue\",strokeWidth: 4} );\n \nvar correct_line = board.create('functiongraph',[function(x){ return m*x+c},-22,22], {strokeColor:\"green\",setLabelText:'mx+c',visible: false, strokeWidth: 4, highlightStrokeColor: 'green'} )\n\nquestion.lines = {\n l:line, c:correct_line\n}\n\n question.signals.on('HTMLAttached',function(e) {\nko.computed(function(){\nvar expr = question.parts[2].gaps[0].display.studentAnswer();\n\n//define ans as this \ntry {\n ans = Numbas.jme.compile(expr,scope);\n}\ncatch(e) {\n ans = null;\n}\nline.updateCurve();\ncorrect_line.updateCurve();\nboard.update();\n});\n });\n\n\nreturn div;", "parameters": [], "language": "javascript"}}, "rulesets": {}}, {"name": "Conversions - Decimals and Percentages", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bonny Barkus", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/775/"}], "functions": {}, "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll"], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"distractors": ["", "", "", "", "", "", "", ""], "prompt": "

Select the answer that is equal to $\\var{a}$%

", "matrix": ["1", 0, 0, 0, 0, 0, 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["

$\\var{b}$

", "

$\\var{c}$

", "

$\\var{d}$

", "

$\\var{f}$

", "

$\\var{g}$

", "

$\\var{h}$

", "

$\\var{j}$

", "

$\\var{k}$

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": "1", "scripts": {}, "marks": 0, "displayColumns": "0", "showCorrectAnswer": true, "type": "1_n_2", "minMarks": "1"}, {"distractors": ["", "", "", "", "", "", "", ""], "prompt": "

Select the answer that is equal to $\\var{l}$%

", "matrix": ["1", 0, 0, 0, 0, 0, 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["

$\\var{m}$

", "

$\\var{n}$

", "

$\\var{o}$

", "

$\\var{p}$

", "

$\\var{q}$

", "

$\\var{r}$

", "

$\\var{s}$

", "

$\\var{t}$

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": "1", "scripts": {}, "marks": 0, "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": "1"}, {"distractors": ["", "", "", "", "", "", "", ""], "prompt": "

Select the answer that is equal to $\\var{u}$

", "matrix": ["1", 0, 0, 0, 0, 0, 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["

$\\var{v}$ %

", "

$\\var{w}$ %

", "

$\\var{x}$ %

", "

$\\var{y}$ %

", "

$\\var{z}$ %

", "

$\\var{aa}$ %

", "

$\\var{bb}$ %

", "

$\\var{cc}$ %

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": "1", "scripts": {}, "marks": 0, "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": "1"}, {"distractors": ["", "", "", "", "", "", "", ""], "prompt": "

Select the answer that is equal to $\\var{dd}$

", "matrix": ["1", 0, 0, 0, 0, 0, 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["

$\\var{ee}$ %

", "

$\\var{ff}$ %

", "

$\\var{gg}$ %

", "

$\\var{hh}$ %

", "

$\\var{ii}$ %

", "

$\\var{jj}$ %

", "

$\\var{kk}$ %

", "

$\\var{ll}$ %

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": "1", "scripts": {}, "marks": 0, "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": "1"}, {"maxAnswers": 0, "prompt": "

Match up the equivalent decimals and percentages

", "matrix": [["1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "shuffleAnswers": false, "minAnswers": 0, "variableReplacements": [], "answers": ["

$50$ %

", "

$25$ %

", "

$20$ %

", "

$10$ %

", "

$12.5$ %

", "

$5$ %

", "

$4$ %

", "

$1$ %

", "

$33.\\dot{3}$ %

", "

$11.\\dot{1}$ %

", "

$60$ %

", "

$30$ %

", "

$85$ %

", "

$66.\\dot{6}$ %

", "

$45$ %

"], "choices": ["

$0.5$

", "

$0.25$

", "

$0.2$

", "

$0.1$

", "

$0.125$

", "

$0.05$

", "

$0.04$

", "

$0.01$

", "

$0.3\\dot{3}$

", "

$0.1\\dot{1}$

", "

$0.6$

", "

$0.3$

", "

$0.85$

", "

$0.6\\dot{6}$

", "

$0.45$

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "marks": 0, "warningType": "none", "showCorrectAnswer": true, "type": "m_n_x", "shuffleChoices": false, "minMarks": 0, "layout": {"expression": "", "type": "all"}}], "statement": "

Here you just need to pick out the solution that is equivalent to the value in the question.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"aa": {"definition": "u*2", "templateType": "anything", "group": "Ungrouped variables", "name": "aa", "description": ""}, "jj": {"definition": "dd*2", "templateType": "anything", "group": "Ungrouped variables", "name": "jj", "description": ""}, "cc": {"definition": "u*20", "templateType": "anything", "group": "Ungrouped variables", "name": "cc", "description": ""}, "gg": {"definition": "dd/100", "templateType": "anything", "group": "Ungrouped variables", "name": "gg", "description": ""}, "ll": {"definition": "dd*20", "templateType": "anything", "group": "Ungrouped variables", "name": "ll", "description": ""}, "ee": {"definition": "dd*100", "templateType": "anything", "group": "Ungrouped variables", "name": "ee", "description": ""}, "bb": {"definition": "u*200", "templateType": "anything", "group": "Ungrouped variables", "name": "bb", "description": ""}, "dd": {"definition": "random(0..1#0.001)", "templateType": "anything", "group": "Ungrouped variables", "name": "dd", "description": ""}, "hh": {"definition": "dd*1000\n", "templateType": "anything", "group": "Ungrouped variables", "name": "hh", "description": ""}, "ff": {"definition": "dd*10", "templateType": "anything", "group": "Ungrouped variables", "name": "ff", "description": ""}, "a": {"definition": "random(1..100) //random percentage between 1 and 100", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "ii": {"definition": "dd/10", "templateType": "anything", "group": "Ungrouped variables", "name": "ii", "description": ""}, "c": {"definition": "a/10", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "a/100", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "a*100", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "g": {"definition": "a*10", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "f": {"definition": "a/1000", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "kk": {"definition": "dd*200", "templateType": "anything", "group": "Ungrouped variables", "name": "kk", "description": ""}, "h": {"definition": "a/2", "templateType": "anything", "group": "Ungrouped variables", "name": "h", "description": ""}, "k": {"definition": "a/20", "templateType": "anything", "group": "Ungrouped variables", "name": "k", "description": ""}, "j": {"definition": "a/200", "templateType": "anything", "group": "Ungrouped variables", "name": "j", "description": ""}, "m": {"definition": "l/100", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "l": {"definition": "random(1..100#0.1) //random decimal percentage", "templateType": "anything", "group": "Ungrouped variables", "name": "l", "description": ""}, "o": {"definition": "l*100", "templateType": "anything", "group": "Ungrouped variables", "name": "o", "description": ""}, "n": {"definition": "l/10", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "q": {"definition": "l*10", "templateType": "anything", "group": "Ungrouped variables", "name": "q", "description": ""}, "p": {"definition": "l/1000", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "s": {"definition": "l/200", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "r": {"definition": "l/2", "templateType": "anything", "group": "Ungrouped variables", "name": "r", "description": ""}, "u": {"definition": "random(0..1#0.01) //random decimal to become a percentage", "templateType": "anything", "group": "Ungrouped variables", "name": "u", "description": ""}, "t": {"definition": "l/20", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "w": {"definition": "u*10", "templateType": "anything", "group": "Ungrouped variables", "name": "w", "description": ""}, "v": {"definition": "u*100", "templateType": "anything", "group": "Ungrouped variables", "name": "v", "description": ""}, "y": {"definition": "u*1000", "templateType": "anything", "group": "Ungrouped variables", "name": "y", "description": ""}, "x": {"definition": "u/100", "templateType": "anything", "group": "Ungrouped variables", "name": "x", "description": ""}, "z": {"definition": "u/10", "templateType": "anything", "group": "Ungrouped variables", "name": "z", "description": ""}}, "metadata": {"description": "

This question concentrates on converting between decimals and percentages

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Conversions - Fractions and Percentages", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bonny Barkus", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/775/"}], "functions": {}, "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n"], "tags": [], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

Insert a fraction that has the same value as the following percentages:

\n

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

\n

$\\var{b}$ % = [[1]]

\n

$\\var{c}$ % = [[2]]

\n

$\\var{d}$ % = [[3]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "a/100", "minValue": "a/100", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "b/100", "minValue": "b/100", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "c/100", "minValue": "c/100", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "d/100", "minValue": "d/100", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Insert the correct percentage for each of these fractions

\n

$\\frac{\\var{f}}{\\var{g}}$ = [[0]]

\n

$\\frac{\\var{h}}{\\var{j}}$ = [[1]]

\n

$\\frac{\\var{k}}{\\var{l}}$ = [[2]]

\n

$\\frac{\\var{m}}{\\var{n}}$ = [[3]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "(f/g)*100", "minValue": "(f/g)*100", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "(h/j)*100", "minValue": "(h/j)*100", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "(k/l)*100", "minValue": "(k/l)*100", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "(m/n)*100", "minValue": "(m/n)*100", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"maxAnswers": "15", "prompt": "

Match up commonly used fractions and percentages

", "matrix": [["1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, "1", 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "shuffleAnswers": true, "minAnswers": "10", "variableReplacements": [], "answers": ["

$\\frac{1}{2}$

", "

$\\frac{1}{4}$

", "

$\\frac{1}{5}$

", "

$\\frac{1}{10}$

", "

$\\frac{1}{8}$

", "

$\\frac{1}{20}$

", "

$\\frac{1}{25}$

", "

$\\frac{1}{100}$

", "

$\\frac{1}{3}$

", "

$\\frac{1}{9}$

", "

$\\frac{3}{4}$

", "

$\\frac{2}{5}$

", "

$\\frac{1}{11}$

", "

$\\frac{1}{6}$

", "

$\\frac{1}{45}$

"], "choices": ["

$50$ %

", "

$25$ %

", "

$20$ %

", "

$10$ %

", "

$12.5$ %

", "

$5$ %

", "

$4$ %

", "

$1$ %

", "

$33.\\dot{3}$ %

", "

$11.\\dot{1}$ %

", "

$60$ %

", "

$30$ %

", "

$85$ %

", "

$66.\\dot{6}$ %

", "

$45$ %

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": "10", "scripts": {}, "marks": 0, "warningType": "none", "showCorrectAnswer": true, "type": "m_n_x", "shuffleChoices": true, "minMarks": "10", "layout": {"expression": "", "type": "all"}}], "statement": "

This question allows you to practice converting between fractions and percentages.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(0..100#10 except [0,100])", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(0..100 except [0,100])", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(0..100#5 except [0,100])", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "random(1..200)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "g": {"definition": "random([2,4,5,10,20,25,50,100])", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "f": {"definition": "random(1..g-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "h": {"definition": "random(0..j-1#2 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "h", "description": ""}, "k": {"definition": "random(0..l-1#4 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "k", "description": ""}, "j": {"definition": "random([4,5,10,20,25,40,50,100,200])", "templateType": "anything", "group": "Ungrouped variables", "name": "j", "description": ""}, "m": {"definition": "random(1..n)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "l": {"definition": "random([8,16,20,40,80,100,200,400])", "templateType": "anything", "group": "Ungrouped variables", "name": "l", "description": ""}, "n": {"definition": "random([3,6,9])", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}}, "metadata": {"description": "

This question will help you practice converting between fractions and percentages

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