// Numbas version: finer_feedback_settings {"name": "Open day Numbas taster", "metadata": {"description": "

Some questions for our open day, to give students a first taste of Numbas.

", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 0, "percentPass": "0", "showQuestionGroupNames": true, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Investigate", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["Determine the formula for a mystery function"], "variable_overrides": [[]], "questions": [{"name": "Determine the formula for a mystery function - open day version", "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/"}], "tags": [], "metadata": {"description": "

This is a copy of a question from the Numbas demos project, with references to the editor removed.

\n

The student is shown a plot of a mystery function. They can enter values of $x$ check, within the bounds of the plot.

\n

They're asked to give the formula for the function, and then asked for its value at a very large value of $x$.

\n

A plot of the student's function updates automatically as they type. Adaptive marking is used for the final part to award credit if the student gives the right value for their incorrect function.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Here's a plot of a function $f(x)$:

\n

{static_plot}

", "advice": "

The function is periodic and looks like one of the functions $\\sin(x)$ or $\\cos(x)$, scaled in both the horizontal and vertical directions.

\n

So guess that it's either of the form $a\\sin(bx)$ or $a\\cos(bx)$.

\n

Remember that $\\sin(0)=0$, while $\\cos(x)=1$.

\n

Because the plot goes through the origin, we can say that $f(x) = 0$, so the form is $a\\sin(bx)$.

\n

{advice_plot_amplitude}

\n

The maximum value that $\\sin(bx)$ reaches is $1$, so the highest point reached by the function corresponds to $f(x) = a$.

\n

The peaks shown on the graph are at $y = \\var{amplitude}$, so $a = \\var{amplitude}$.

\n

$\\sin(bx) =0 $ at $x=n\\pi/b$, so look at the places that the plot crosses the $x$-axis.

\n

Setting $n=1$, the first crossing after the origin, we can find $b = \\dfrac{\\pi}{x}$.

\n

The plot first crosses the $x$-axis at $x = \\var[fractionnumbers]{frequency}$, so $b = \\simplify{pi/{frequency}}$.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"expr_plot": {"name": "expr_plot", "group": "Ungrouped variables", "definition": "jsxgraph(\n 480,300,\n [-x_bound,10,x_bound,-10],\n [\n ['functiongraph',[expr,-x_bound,x_bound], [\"id\": \"target_fn\"]],\n ['functiongraph',[expr,-x_bound,x_bound], [\"id\": \"student_fn\", \"strokeWidth\": 3, strokeColor: \"black\"]]\n ]\n)", "description": "

A dynamic plot showing the target function and the student's function in thick black.

", "templateType": "anything", "can_override": false}, "expr": {"name": "expr", "group": "Ungrouped variables", "definition": "expression(\"{amplitude}*sin(pi*x/{frequency})\")", "description": "

The mystery function.

", "templateType": "anything", "can_override": false}, "amplitude": {"name": "amplitude", "group": "Ungrouped variables", "definition": "random(3 .. 7#1)", "description": "

The amplitude of the function.

", "templateType": "randrange", "can_override": false}, "frequency": {"name": "frequency", "group": "Ungrouped variables", "definition": "random(1 .. 4#1)", "description": "

The frequency of the oscillation.

", "templateType": "randrange", "can_override": false}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "random(-4..4 except 0)", "description": "", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "random(-99.5..99.5 except -20..20)*frequency", "description": "

A large value of $x$ that the student will have to evaluate $f(x)$ at.

", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "Ungrouped variables", "definition": "precround(eval(expr,[\"x\":x1]),2)", "description": "", "templateType": "anything", "can_override": false}, "y2": {"name": "y2", "group": "Ungrouped variables", "definition": "precround(eval(expr,[\"x\":x2]),2)", "description": "", "templateType": "anything", "can_override": false}, "advice_plot_amplitude": {"name": "advice_plot_amplitude", "group": "Ungrouped variables", "definition": "jsxgraph(\n 800,500,\n [-x_bound,10,x_bound,-10],\n [\n ['functiongraph',[expr,-x_bound,x_bound], [\"id\": \"target_fn\"]],\n ['line',[[0,amplitude],[1,amplitude]], [\"dash\": 2, \"strokeColor\": \"black\"]]\n ]\n)", "description": "", "templateType": "anything", "can_override": false}, "x_bound": {"name": "x_bound", "group": "Ungrouped variables", "definition": "8", "description": "

The student is shown values of the function whose absolute value is at most this.

", "templateType": "anything", "can_override": false}, "static_plot": {"name": "static_plot", "group": "Ungrouped variables", "definition": "jsxgraph(\n 800,250,\n [-x_bound,10,x_bound,-10],\n [\n ['functiongraph',[expr,-x_bound,x_bound], [\"id\": \"target_fn\"]]\n ]\n)", "description": "

A static plot of the function to go in the statement.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["amplitude", "frequency", "expr", "x_bound", "static_plot", "expr_plot", "x1", "x2", "y1", "y2", "advice_plot_amplitude"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Check precise values", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "y: precround(eval(expr, [\"x\":studentNumber]),5)\n\nin_bounds:\n assert(abs(studentNumber)<=x_bound,\n warn(\"You can only ask for values of $x$ between {-x_bound} and {x_bound}.\");\n fail(\"You can only ask for values of $x$ between {-x_bound} and {x_bound}.\")\n )\n\nmark:\n apply(studentNumber);\n apply(in_bounds);\n feedback(\"$f(\"+studentNumber+\") = \"+y+\"$\")", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

If you'd like to check the value of the function more carefully, type in a value for $x$ and press Save answer. You'll be shown the corresponding value $f(x)$.

", "minValue": "0", "maxValue": "0", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "gapfill", "useCustomName": true, "customName": "Write $f(x)$", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Here's a plot of $f(x)$ again:

\n

{expr_plot}

\n

Write a definition of this function in the form $y = f(x)$.

\n

Your function will be plotted in black on top of the given plot above.

\n

$y = $ [[0]]

", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

This function is periodic. It looks like it involves either $\\sin(x)$ or $\\cos(x)$.

\n

If you can't tell which one it is, try entering them and see which function looks like the closest match at $x=0$.

"}, {"type": "numberentry", "useCustomName": true, "customName": "Amplitude", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the highest value that this function reaches?

", "minValue": "amplitude", "maxValue": "amplitude", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Wavelength", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What is the distance between points where the function crosses the horizontal axis?

", "minValue": "frequency", "maxValue": "frequency", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "gaps": [{"type": "jme", "useCustomName": true, "customName": "$f(x)$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "studentVariables (Variables used in the student's answer):\n if(studentExpr<>nothing,\n scope_case_sensitive(set(findvars(studentExpr)),settings[\"caseSensitive\"]),\n set()\n )\n\n\nstudent_fn (The plot of the student's function in the diagram):\n expr_plot[\"student_fn\"]\n\njxg_input:\n if(studentExpr<>nothing and studentVariables=set(\"x\"),\n [ jxg_set_term(student_fn, studentExpr)\n , jxg_show(student_fn, true)\n ],\n [jxg_show(student_fn, false)]\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{expr}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": false, "implicitFunctionComposition": true, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "numberentry", "useCustomName": true, "customName": "$f(\\var{x2})$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "expr", "part": "p1g0", "must_go_first": false}], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": "1", "exploreObjective": null, "prompt": "

What is the value of the function at $x = \\var{x2}$?

", "minValue": "y2", "maxValue": "y2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": "100", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "Experiment", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [""], "variable_overrides": [[]], "questions": [{"name": "Decide if a coin is biased", "extensions": ["stats"], "custom_part_types": [{"source": {"pk": 1, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/1/edit"}, "name": "Yes/no", "short_name": "yes-no", "description": "

The student is shown two radio choices: \"Yes\" and \"No\". One of them is correct.

", "help_url": "", "input_widget": "radios", "input_options": {"correctAnswer": "if(eval(settings[\"correct_answer_expr\"]), 0, 1)", "hint": {"static": true, "value": ""}, "choices": {"static": true, "value": ["Yes", "No"]}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=correct_answer,\n correct(),\n incorrect()\n)\n\ninterpreted_answer:\nstudentAnswer=0\n\ncorrect_answer:\nif(eval(settings[\"correct_answer_expr\"]),0,1)", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=correct_answer,\n correct(),\n incorrect()\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer=0"}, {"name": "correct_answer", "description": "", "definition": "if(eval(settings[\"correct_answer_expr\"]),0,1)"}], "settings": [{"name": "correct_answer_expr", "label": "Is the answer \"Yes\"?", "help_url": "", "hint": "An expression which evaluates to true or false.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "tags": [], "metadata": {"description": "An interactive experiment about probability: the student must first 'design' the experiment by deciding how many times they're going to flip a coin, and define what number of heads would make them believe the coin is biased. They must then enter the results of their coin flips, calculate the percentage of heads, and finally decide if the coin is biased, using the condition they specified in the design stage. There are optional hints at each stage.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "variables": {"flips": {"name": "flips", "group": "Ungrouped variables", "definition": "parse_flips(flips_string)", "description": "", "templateType": "anything"}, "flips_string": {"name": "flips_string", "group": "Ungrouped variables", "definition": "join(repeat(random(\"h\",\"t\"),num_flips),\" \")", "description": "", "templateType": "anything"}, "num_flips": {"name": "num_flips", "group": "Ungrouped variables", "definition": "100", "description": "", "templateType": "anything"}, "num_heads": {"name": "num_heads", "group": "Ungrouped variables", "definition": "len(filter(x,x,flips))", "description": "", "templateType": "anything"}, "num_tails": {"name": "num_tails", "group": "Ungrouped variables", "definition": "len(flips)-num_heads", "description": "", "templateType": "anything"}, "percent_heads": {"name": "percent_heads", "group": "Ungrouped variables", "definition": "100*num_heads/len(flips)", "description": "", "templateType": "anything"}, "cleaned_flips_string": {"name": "cleaned_flips_string", "group": "Ungrouped variables", "definition": "join(map(if(x,\"H\",\"T\"),x,flips),\" \")", "description": "", "templateType": "anything"}, "critical_number": {"name": "critical_number", "group": "Ungrouped variables", "definition": "max(raw_critical_number, num_flips-raw_critical_number)", "description": "", "templateType": "anything"}, "is_biased": {"name": "is_biased", "group": "Ungrouped variables", "definition": "num_heads>=critical_number or num_tails>=critical_number", "description": "", "templateType": "anything"}, "raw_critical_number": {"name": "raw_critical_number", "group": "Ungrouped variables", "definition": "60", "description": "", "templateType": "anything"}, "critical_likelihood": {"name": "critical_likelihood", "group": "Ungrouped variables", "definition": "critical_number/num_flips", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["num_flips", "raw_critical_number", "critical_number", "flips_string", "flips", "num_heads", "num_tails", "percent_heads", "cleaned_flips_string", "is_biased", "critical_likelihood"], "variable_groups": [], "functions": {"parse_flips": {"parameters": [["s", "string"]], "type": "list", "language": "javascript", "definition": "s = s.toLowerCase().replace(/[^ht]/g,'');\nreturn s.split('').map(function(c) { return new Numbas.jme.types.TBool(c=='h'); });"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "information", "useCustomName": true, "customName": "Introduction", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Decide number of flips", "rawLabel": "", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

In this exercise you will decide if a coin is biased by flipping it repeatedly and deciding if it lands heads more often than you'd expect.

"}, {"type": "numberentry", "useCustomName": true, "customName": "Decide number of flips", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Define 'biased'", "rawLabel": "", "otherPart": 2, "variableReplacements": [{"variable": "num_flips", "definition": "interpreted_answer"}], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Design the experiment", "prompt": "

How many times will you flip your coin?

", "minValue": "1", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Define 'biased'", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Enter data", "rawLabel": "", "otherPart": 4, "variableReplacements": [{"variable": "raw_critical_number", "definition": "interpreted_answer"}], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}, {"label": "What do you expect an unbiased coin do?", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "not (answered or credit=1)", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Design the experiment", "prompt": "

How many heads would make you think the coin is biased?

", "minValue": "0", "maxValue": "100", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "What do you expect an unbiased coin do?", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

With an unbiased coin, how many flips would you expect to land heads up?

", "minValue": "num_flips/2-0.5", "maxValue": "num_flips/2+0.5", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "patternmatch", "useCustomName": true, "customName": "Enter data", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "right_length:\n if(len(parse_flips(studentAnswer))=num_flips,\n correct(\"You have entered your data correctly.\"),\n incorrect(\"You have not entered the right number of flips.\")\n )\n\nmark:\n apply(right_length)\n", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Calculate proportion of heads", "rawLabel": "", "otherPart": 5, "variableReplacements": [{"variable": "flips_string", "definition": "interpreted_answer"}], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Enter data", "prompt": "

Flip the coin {num_flips} times. Each time it lands heads, write an H in the box below. Each time it lands tails, write a T.

", "answer": "[, hHtT]*", "displayAnswer": "", "matchMode": "regex"}, {"type": "numberentry", "useCustomName": true, "customName": "Calculate proportion of heads", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Show frequencies of heads and tails", "rawLabel": "", "otherPart": 6, "variableReplacements": [], "availabilityCondition": "not (answered and credit=1)", "penalty": "Showed frequencies of heads and tails", "penaltyAmount": "1", "lockAfterLeaving": false}, {"label": "Is the coin biased?", "rawLabel": "", "otherPart": 7, "variableReplacements": [], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Calculate proportion of heads", "prompt": "

Your flips were:

\n

{cleaned_flips_string}

\n

What percentage of the flips landed heads?

", "minValue": "percent_heads", "maxValue": "percent_heads", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "information", "useCustomName": true, "customName": "Show frequencies of heads and tails", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n\n\n\n\n\n\n\n\n\n\n\n\n
ResultHeadsTails
Frequency{num_heads}{num_tails}
"}, {"type": "yes-no", "useCustomName": true, "customName": "Is the coin biased?", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Calculate the critical likelihood", "rawLabel": "", "otherPart": 8, "variableReplacements": [], "availabilityCondition": "not (answered and credit=1)", "penalty": "Hint about critical likelihood", "penaltyAmount": "1", "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Decide if the coin is biased", "prompt": "

Do you think your coin is biased?

", "settings": {"correct_answer_expr": "is_biased"}}, {"type": "numberentry", "useCustomName": true, "customName": "Calculate the critical likelihood", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": "Decide if the coin is biased", "prompt": "

You said that a coin is biased if it comes up heads at least {critical_number} times out of {num_flips}. What's that as a percentage?

", "minValue": "100*critical_likelihood", "maxValue": "100*critical_likelihood", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": "100", "precisionMessage": "", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "explore", "maxMarks": 0, "objectives": [{"name": "Calculate proportion of heads", "limit": "2", "mode": "sum"}, {"name": "Decide if the coin is biased", "limit": "5", "mode": "sum"}, {"name": "Design the experiment", "limit": "2", "mode": "sum"}, {"name": "Enter data", "limit": "1", "mode": "sum"}], "penalties": [{"name": "Showed frequencies of heads and tails", "limit": "1", "mode": "sum"}, {"name": "Hint about critical likelihood", "limit": "1", "mode": "sum"}], "objectiveVisibility": "always", "penaltyVisibility": "when-active", "type": "question"}]}, {"name": "Challenge", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [""], "variable_overrides": [[]], "questions": [{"name": "Solve a system of congruences using the Chinese Remainder Theorem", "extensions": ["working-out"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Anthony Youd", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "tags": [], "metadata": {"description": "

Solving a system of simultaneous congruences using the Chinese Remainder Theorem.

\n

An explore mode question which allows you to write a solution straight away, or break it down into steps.

\n

After solving a system of three congruences, you can ask for a new problem with more congruences.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"rs": {"name": "rs", "group": "Unnamed group", "definition": "random(1..n-1) for: n of: ns", "description": "

The remainders for each of the congruences.

", "templateType": "anything", "can_override": false}, "ys": {"name": "ys", "group": "Unnamed group", "definition": "prod(ns)/n for: n of: ns", "description": "

$(\\prod n_i) / n_i$

", "templateType": "anything", "can_override": false}, "num_rows": {"name": "num_rows", "group": "Unnamed group", "definition": "3", "description": "

The number of congruences.

", "templateType": "anything", "can_override": false}, "ns": {"name": "ns", "group": "Unnamed group", "definition": "iterate(\nons -> ons + [random(x for: x of: n_range where: not some(gcd(g,x)>1 for: g of: ons))], [], num_rows)[-1]", "description": "

Three coprime numbers between 30 and 100.

", "templateType": "anything", "can_override": false}, "n_range": {"name": "n_range", "group": "Unnamed group", "definition": "5 .. 15#1", "description": "

The range of numbers to pick from.

", "templateType": "range", "can_override": true}, "zs": {"name": "zs", "group": "Unnamed group", "definition": "mod(modular_inverse(n,y),n) for: [y,n] of: zip(ys,ns)", "description": "

$y_i^{-1} \\mod n_i$

", "templateType": "anything", "can_override": false}, "solution": {"name": "solution", "group": "Unnamed group", "definition": "mod(sum(r*y*z for: [r,y,z] of: zip(rs,ys,zs)),prod(ns))", "description": "

The lowest solution to the congruences.

", "templateType": "anything", "can_override": false}, "congruences_latex": {"name": "congruences_latex", "group": "Displayed text", "definition": "latex(safe(\"\\\\begin{align}\\n\")+\njoin(\"x \\\\equiv \"+r+\" &\\\\mod \"+n for: [r,n] of: zip(rs,ns), \" \\\\\\\\\\n\")+\nsafe(\"\\n\\\\end{align}\"))", "description": "", "templateType": "anything", "can_override": false}, "congruences_in_words": {"name": "congruences_in_words", "group": "Displayed text", "definition": "html(\"\"\n)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "ns[0]", "description": "

The modulus under consideration. Used when solving the first congruence.

", "templateType": "anything", "can_override": false}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "rs[0]", "description": "

The remainder under consideration. Used when solving the first congruence.

", "templateType": "anything", "can_override": false}, "solutions": {"name": "solutions", "group": "Unnamed group", "definition": "mod(solution, prod(ns[0..i])) for: i of: 1..num_rows", "description": "

Solutions to each of the first $i$ congruences.

", "templateType": "anything", "can_override": false}, "two_congruences_table": {"name": "two_congruences_table", "group": "Displayed text", "definition": "table([n, ns[0]*n + rs[0], mod(ns[0]*n+rs[0], ns[1])] for: n of: 0..ns[1], [\"$n$\", safe(\"$\\\\var{ns[0]}n + \\\\var{rs[0]}$\"), \"Remainder after division by {ns[1]}\"])", "description": "", "templateType": "anything", "can_override": false}, "first_congruence_expression": {"name": "first_congruence_expression", "group": "Unnamed group", "definition": "substitute([\"nn\": ns[0], \"r\": rs[0]], expression(\"nn*n+r\"))", "description": "", "templateType": "anything", "can_override": false}, "had_help": {"name": "had_help", "group": "Ungrouped variables", "definition": "false", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "r", "had_help"], "variable_groups": [{"name": "Unnamed group", "variables": ["num_rows", "n_range", "ns", "rs", "ys", "zs", "solution", "solutions", "first_congruence_expression"]}, {"name": "Displayed text", "variables": ["congruences_latex", "congruences_in_words", "two_congruences_table"]}], "functions": {"extendedgcd": {"parameters": [["a", "number"], ["b", "number"]], "type": "list", "language": "javascript", "definition": "let state = [a,b,1,0,0,1];\nwhile(state[1] > 0) {\n let [x,y,s1,s2,t1,t2] = state;\n let r = x%y;\n let q = (x-r)/y;\n state = [y,r,s2,s1-q*s2, t2, t1-q*t2];\n}\n\nreturn state;"}, "modular_inverse": {"parameters": [["a", "number"], ["b", "number"]], "type": "number", "language": "jme", "definition": "extendedgcd(a,b)[4]"}, "copy": {"parameters": [["el", "html"]], "type": "html", "language": "javascript", "definition": "return el[0].cloneNode(true);"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "information", "useCustomName": true, "customName": "Prompt", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Write the number", "rawLabel": "Write the number", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Get some help", "rawLabel": "Get some help", "otherPart": 2, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Can you find a number that:

\n

{congruences_in_words}

"}, {"type": "numberentry", "useCustomName": true, "customName": "Write a number satisfying the congruences", "marks": "60", "scripts": {}, "customMarkingAlgorithm": "satisfied_congruences:\n map(([n,r]) -> \n feedback(\"The remainder on dividing {studentNumber} by {n} is {mod(studentNumber,n)}.\");\n add_credit_if(mod(studentNumber,n)=r, 1/num_rows, \"This is correct.\", \"This is incorrect.\")\n ,\n zip(ns,rs)\n)\n\nmark:\n apply(validNumber);\n apply(satisfied_congruences)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Get some help", "rawLabel": "Get some help", "otherPart": 2, "variableReplacements": [], "availabilityCondition": "credit<1 and not had_help", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Try another problem with more statements.", "rawLabel": "Try another problem with more statements.", "otherPart": 1, "variableReplacements": [{"variable": "num_rows", "definition": "num_rows+1"}, {"variable": "had_help", "definition": "true"}], "availabilityCondition": "answered and credit=1 and num_rows<9", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Find out what this is all about", "rawLabel": "Find out what this is all about", "otherPart": 7, "variableReplacements": [], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Go on, then! Write a number that:

\n

{copy(congruences_in_words)}

", "minValue": "solution", "maxValue": "solution", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "information", "useCustomName": true, "customName": "Help", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Solve the first congruence", "rawLabel": "", "otherPart": 3, "variableReplacements": [{"variable": "had_help", "definition": "true"}], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You can break this down step by step.

\n

Try finding a number satisfying each line, one at a time.

"}, {"type": "numberentry", "useCustomName": true, "customName": "Solve the first congruence", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "mark:\n apply(validNumber);\n correctif(mod(studentNumber,ns[0])=rs[0]);\n assert(studentNumber>rs[0], feedback(\"That's the easiest answer to find. Can you find another one?\"))", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Write an expression for numbers satisfying the first congruence", "rawLabel": "", "otherPart": 4, "variableReplacements": [], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Solve all the congruences", "prompt": "

Write a number which leaves a remainder of {r} when divided by {n}.

", "minValue": "n+r", "maxValue": "n+r", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": true, "customName": "Write an expression for numbers satisfying the first congruence", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Solve the second congruence", "rawLabel": "", "otherPart": 5, "variableReplacements": [{"variable": "first_congruence_expression", "definition": "interpreted_answer"}], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Write an expression in terms of $n$ for numbers which leave a remainder {rs[0]} when divided by {ns[0]}.

\n

For example, the numbers which leave a remainder of 1 when divided by 2 can all be written in the form $2n+1$.

", "answer": "{n}n + {r}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "n", "value": ""}]}, {"type": "numberentry", "useCustomName": true, "customName": "Solve the second congruence", "marks": "30", "scripts": {}, "customMarkingAlgorithm": "num_rows_to_mark: 2\n\nsatisfied_congruences:\n map(([n,r]) -> \n feedback(\"The remainder on dividing {studentNumber} by {n} is {mod(studentNumber,n)}.\");\n add_credit_if(mod(studentNumber,n)=r, 1/num_rows_to_mark, \"This is correct.\", \"This is incorrect.\")\n ,\n zip(ns,rs)[0..num_rows_to_mark]\n)\n\nmark:\n apply(validNumber);\n apply(satisfied_congruences)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Help with solving two congruences", "rawLabel": "", "otherPart": 6, "variableReplacements": [], "availabilityCondition": "not (answered and credit=1)", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Write a number satisfying all the statements", "rawLabel": "Write a number satisfying all the statements", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "answered and credit=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": "Solve all the congruences", "prompt": "

You said that numbers which leave a remainder of {rs[0]} when divided by {ns[0]} can be written in the form

\n

\\[ \\var{first_congruence_expression} \\]

\n

Now write a number which satisfies that expression and also leaves a remainder of {rs[1]} when divided by {ns[1]}.

", "minValue": "solutions[1]", "maxValue": "solutions[1]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "information", "useCustomName": true, "customName": "Help with solving two congruences", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Write a number satisfying all the statements", "rawLabel": "Write a number satisfying all the statements", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

You've already said that numbers which leave a remainder of {rs[0]} when divided by {ns[0]} can be written in the form

\n

\\[ \\var{ns[0]}n + \\var{rs[0]} \\]

\n

To find a number which also leaves a remainder of {rs[1]} when divided by {ns[1]}, you could just try different values of $n$ until you find one.

\n

{two_congruences_table}

\n

So {solutions[1]} is a solution.

"}, {"type": "information", "useCustomName": true, "customName": "About the theorem", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The statements you were given are called linear congruences.

\n

There's another way of writing them: for the statement \"$x$ leaves a remainder of $r$ when divided by $n$\", we write:

\n

\\[ x \\equiv r \\mod n \\]

\n

The number after $\\bmod$ is called the modulus.

\n

So the statements you were given can be written as this system of congruence equations:

\n

{congruences_latex}

\n

This system has a solution when all of the moduli are coprime.

\n

This is called the Chinese remainder theorem, after the first person known to have written about it, the Chinese mathematician Sunzi, in the 3rd to 5th century CE.

\n

Today we say that this is a theorem from number theory.

\n

The Chinese remainder theorem is widely used for computing with large integers, as it allows replacing a computation for which one knows a bound on the size of the result by several similar computations on small integers

"}], "partsMode": "explore", "maxMarks": 0, "objectives": [{"name": "Solve all the congruences", "limit": "60"}], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "GCSE to A-Level transition questions", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", ""], "variable_overrides": [[], [], [], []], "questions": [{"name": "Chain rule - binomial", "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": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "tags": ["Calculus", "calculus", "chain rule", "checked2015", "derivative of a function of a function", "differentiation", "Differentiation", "function of a function", "Steps", "steps"], "metadata": {"description": "

Differentiate $\\displaystyle (ax^m+b)^{n}$.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Differentiate the following function $f(x)$ using the chain rule.

", "advice": "

$\\simplify[std]{f(x) = ({a} * x^{m}+{b})^{n}}$

\n

The chain rule says that if $f(x)=g(h(x))$ then

\n

\\[\\simplify[std]{f'(x) = h'(x)g'(h(x))}\\]

\n

One way to find $f'(x)$ is to let $u=h(x)$ then we have $f(u)=g(u)$ as a function of $u$.

\n

Then we use the chain rule in the form:

\n

\\[\\frac{\\mathrm{d}f}{\\mathrm{d}x} = \\frac{\\mathrm{d}u}{\\mathrm{d}x}\\frac{\\mathrm{d}f(u)}{\\mathrm{d}u}\\]

\n

Once you have worked this out, you replace $u$ by $h(x)$ and your answer is now in terms of $x$.

\n

For this example, we let $u=\\simplify[std]{{a} * x^{m}+{b}}$ and we have $f(u)=\\simplify[std]{u^{n}}$.

\n

This gives

\n

\\begin{align}
\\frac{\\mathrm{d}u}{\\mathrm{d}x} &= \\simplify[std]{{m*a}x ^ {m -1}} \\\\[1em]
\\frac{\\mathrm{d}f(u)}{\\mathrm{d}u} &= \\simplify[std]{{n}u^{n-1}}
\\end{align}

\n

Hence on substituting into the chain rule above we get:

\n

\\begin{align}
\\frac{\\mathrm{d}f}{\\mathrm{d}x} &= \\simplify[std]{{m*a}x ^ {m-1} * ({n}*u^{n-1})} \\\\
&= \\simplify[std]{{m*a*n}x^{m-1}u^{n-1}} \\\\
&= \\simplify[std]{{m*a*n}x^{m-1}({a}*x^{m}+{b})^{n-1}}
\\end{align}

\n

on replacing $u$ by $\\simplify[std]{{a}x^{m}+{b}}$.

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"], "surdf": [{"result": "(sqrt(b)*a)/b", "pattern": "a/sqrt(b)"}]}, "variables": {"s1": {"name": "s1", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(5..9)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything"}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "s1", "b", "m", "n"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

\\[\\simplify[std]{f(x) = ({a} * x^{m}+{b})^{n}}\\]

\n

$\\displaystyle \\frac{\\mathrm{d}f}{\\mathrm{d}x}=$ [[0]]

\n

Click on Show steps for more information. You will not lose any marks by doing so.

", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The chain rule says that if $f(x)=g(h(x))$ then

\n

\\[\\simplify[std]{f'(x) = h'(x)g'(h(x))}\\]

\n

One way to find $f'(x)$ is to let $u=h(x)$ then we have $f(u)=g(u)$ as a function of $u$.

\n

Then we use the chain rule in the form:

\n

\\[\\frac{\\mathrm{d}f}{\\mathrm{d}x} = \\frac{\\mathrm{d}u}{\\mathrm{d}x}\\frac{\\mathrm{d}f}{\\mathrm{d}u}\\]

\n

Once you have worked this out, you replace $u$ by $h(x)$ and your answer is now in terms of $x$.

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 3, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a*m*n}x ^ {m-1} * ({a} * x^{m}+{b})^{n-1}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": false, "implicitFunctionComposition": false, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Construct the region satisfied by three inequalities", "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": "Kate Henderson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/808/"}, {"name": "Aamir Khan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4537/"}], "tags": [], "metadata": {"description": "

The student is shown a set of axes with three lines. They must move the lines so they match the given inequalities, then move a point inside the region satisfied by the inequalities.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

On the grid, identify the region that satisfies all these inequalities.

\n

\\begin{align}
y &\\gt \\var{y1}
&
x+y &\\lt \\var{y3}
&
y &\\lt \\simplify{{m2}x}
\\end{align}

", "advice": "

The diagram should look like this:

\n

{correct_board}

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"g": {"name": "g", "group": "Ungrouped variables", "definition": "jessiecode(600,600,[-bound,bound,bound,-bound],\"\"\"\n a1 = point(-1,1) <>;\n a2 = point(1,2) <>;\n a = line(a1,a2) <>;\n\n b1 = point(-1,2) <>;\n b2 = point(1,3) <>;\n b = line(b1,b2) <>;\n \n c1 = point(-1,3) <>;\n c2 = point(1,4) <>;\n c = line(c1,c2) <>;\n \n p1 = intersection(a,b) <>;\n p2 = intersection(a,c) <>;\n p3 = intersection(b,c) <>;\n \n // polygon(p1,p2,p3) <>;\n \n region = point(-0.5,0.5) <>;\n\"\"\")", "description": "

The graph to show to the student.

", "templateType": "anything", "can_override": false}, "bound": {"name": "bound", "group": "Ungrouped variables", "definition": "7", "description": "", "templateType": "anything", "can_override": false}, "correct_lines": {"name": "correct_lines", "group": "Ungrouped variables", "definition": "[\n [0,m2],\n [y1,0],\n [y3,-1]\n]", "description": "

Parameters for the inequalities, in the form [y-intercept, slope].

", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "Ungrouped variables", "definition": "random(0,1,2)", "description": "

The height of the horizontal line.

", "templateType": "anything", "can_override": false}, "m2": {"name": "m2", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "

The graidnet of the line through the origin.

", "templateType": "anything", "can_override": false}, "y3": {"name": "y3", "group": "Ungrouped variables", "definition": "random(4,5,6)", "description": "

The y-intercept of the diagonal line

", "templateType": "anything", "can_override": false}, "correct_board": {"name": "correct_board", "group": "Ungrouped variables", "definition": "jessiecode(600,600,[-bound,bound,bound,-bound],\"\"\"\n a1 = point(-1,{y1}) <>;\n a2 = point(1,{y1}) <>;\n a = line(a1,a2) <>;\n\n b1 = point(0,{y3}) <>;\n b2 = point({y3},0) <>;\n b = line(b1,b2) <>;\n \n c1 = point(0,0) <>;\n c2 = point(1,{m2}) <>;\n c = line(c1,c2) <>;\n \n p1 = intersection(a,b) <>;\n p2 = intersection(a,c) <>;\n p3 = intersection(b,c) <>;\n \n // polygon(p1,p2,p3) <>;\n \n region = incenter(p1,p2,p3) <>;\n\"\"\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["bound", "g", "correct_lines", "y1", "m2", "y3", "correct_board"], "variable_groups": [], "functions": {"get_lines": {"parameters": [], "type": "list", "language": "javascript", "definition": "var board = scope.getVariable('g').board;\nvar lines = ['a','b','c'].map(function(x) { return board.elementsByName[x]; });\nvar line_props = lines.map(function(l) { return [l.getRise(), l.getSlope()]; });\nreturn Numbas.jme.wrapValue(line_props);"}, "get_region_point": {"parameters": [], "type": "vector", "language": "javascript", "definition": "var board = scope.getVariable('g').board;\nvar p = board.elementsByName['A'];\nreturn [p.X(),p.Y()];"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "extension", "useCustomName": false, "customName": "", "marks": 1, "scripts": {"constructor": {"script": "this.marks = 5;", "order": "after"}}, "customMarkingAlgorithm": "student_lines: get_lines()\n\nstudent_point: get_region_point()\n\npoint_in_shaded_region:\n let([x,y],student_point, all([y>y1, x+y{g}

\n

Drag the points to move the lines around, and then move point A inside the region satisfied by the inequalities.

"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Expanding Brackets", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Kate Henderson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/808/"}], "tags": [], "metadata": {"description": "

Expand $(az^2+bz+c)(pz+q)$.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Expand the following brackets.

\n

Your answers should not include any brackets.

\n

Note: to enter $xy$ here you will need to use the syntax x*y

", "advice": "", "rulesets": {"std": ["all", "!noLeadingMinus", "!collectNumbers"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,a])", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,c])", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(-3..3 except [0,b,d])", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(1..3 except [a,c])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "d", "q", "p"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify[std]{({a}x+{b})({p}x+{q})}=\\;$[[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a*p}*x^2+({a*q+b*p})x+{b*q}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "`! m_anywhere(?*(? + ?`+))", "partialCredit": 0, "message": "Your answer should not contain brackets.", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify[std]{({c}+y)(x+{d}y)}=\\;$[[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{d}*y^2+x*y+{c*d}*y+{c}*x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "`! m_anywhere(?*(? + ?`+))", "partialCredit": 0, "message": "Your answer should not contain brackets.", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\simplify[std]{({a}z^2+{b}z+{c})({p}z+{q})}=\\;$[[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a*p}z^3+{a*q+p*b}z^2+{q*b+c*p}z+{c*q}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["(", "zz", "z*z"], "showStrings": false, "partialCredit": 0, "message": "

Do not include brackets in your answer. Input your answer as a cubic in $z$, in the form $az^3+bz^2+cz+d$ for appropriate integers $a,\\;b,\\;c,\\;d$.

"}, "mustmatchpattern": {"pattern": "`! m_anywhere(?*(? + ?`+))", "partialCredit": 0, "message": "Your answer should not contain brackets.", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "z", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Simultaneous equations: linear and quadratic, two points", "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": "Kate Henderson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/808/"}, {"name": "Katherine Tomlinson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1652/"}], "tags": [], "metadata": {"description": "

The student is given the equations of a line and a circle, and has to find the coordinates of the points of intersection. They're always at integer coordinates.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"minroot": {"name": "minroot", "group": "Ungrouped variables", "definition": "min(root1,root2)", "description": "", "templateType": "anything", "can_override": false}, "quadxcoeff": {"name": "quadxcoeff", "group": "Ungrouped variables", "definition": "sroots+grad", "description": "", "templateType": "anything", "can_override": false}, "ansyvalue2": {"name": "ansyvalue2", "group": "Ungrouped variables", "definition": "grad*maxroot+yint", "description": "", "templateType": "anything", "can_override": false}, "sroots": {"name": "sroots", "group": "Ungrouped variables", "definition": "-root1-root2", "description": "", "templateType": "anything", "can_override": false}, "root2": {"name": "root2", "group": "Ungrouped variables", "definition": "random(-12..12)", "description": "", "templateType": "anything", "can_override": false}, "root1": {"name": "root1", "group": "Ungrouped variables", "definition": "random(-12..12)", "description": "", "templateType": "anything", "can_override": false}, "quadccoeff": {"name": "quadccoeff", "group": "Ungrouped variables", "definition": "proots+yint", "description": "", "templateType": "anything", "can_override": false}, "maxroot": {"name": "maxroot", "group": "Ungrouped variables", "definition": "max(root1, root2)", "description": "", "templateType": "anything", "can_override": false}, "proots": {"name": "proots", "group": "Ungrouped variables", "definition": "root1*root2", "description": "", "templateType": "anything", "can_override": false}, "yint": {"name": "yint", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "grad": {"name": "grad", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "ansyvalue": {"name": "ansyvalue", "group": "Ungrouped variables", "definition": "grad*minroot+yint", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["root1", "root2", "grad", "sroots", "proots", "yint", "quadxcoeff", "quadccoeff", "ansyvalue", "ansyvalue2", "minroot", "maxroot"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the $x$ and $y$ values that satisfy both of the following equations. That is, find the point of intersection of the two curves.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{grad}x+{yint}}$               $(1)$
$y$$=$$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$               $(2)$
\n

Give the points of intersection $(x_1,y_1)$ and $(x_2,y_2)$ such that $x_1<x_2$.

\n

$x_1=$ [[0]],   $y_1=$ [[1]]

\n

$x_2=$ [[2]],   $y_2=$ [[3]]

\n

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "$x_1$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "minroot", "maxValue": "minroot", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "$y_1$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansyvalue", "maxValue": "ansyvalue", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "$x_2$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "maxroot", "maxValue": "maxroot", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "$y_2$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansyvalue2", "maxValue": "ansyvalue2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": true, "typeendtoleave": false, "startpassword": "", "autoSubmit": true, "allowAttemptDownload": false, "downloadEncryptionKey": "", "showresultspage": "oncompletion"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"enterreviewmodeimmediately": true, "showactualmarkwhen": "never", "showtotalmarkwhen": "never", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview", "allowrevealanswer": true, "intro": "

These questions will give you an impression of the system, Numbas, that we use during our course.

\n

You'll have access to Numbas questions to practice while studying, and many in-course assessments take place in Numbas.

", "end_message": "", "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "reviewshowexpectedanswer": true, "showanswerstate": true, "reviewshowfeedback": false, "showactualmark": false, "showtotalmark": false, "reviewshowscore": false, "reviewshowadvice": true}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": ["jsxgraph", "stats", "working-out"], "custom_part_types": [{"source": {"pk": 1, "author": {"name": "Christian Lawson-Perfect", "pk": 7}, "edit_page": "/part_type/1/edit"}, "name": "Yes/no", "short_name": "yes-no", "description": "

The student is shown two radio choices: \"Yes\" and \"No\". One of them is correct.

", "help_url": "", "input_widget": "radios", "input_options": {"correctAnswer": "if(eval(settings[\"correct_answer_expr\"]), 0, 1)", "hint": {"static": true, "value": ""}, "choices": {"static": true, "value": ["Yes", "No"]}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nif(studentanswer=correct_answer,\n correct(),\n incorrect()\n)\n\ninterpreted_answer:\nstudentAnswer=0\n\ncorrect_answer:\nif(eval(settings[\"correct_answer_expr\"]),0,1)", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "if(studentanswer=correct_answer,\n correct(),\n incorrect()\n)"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "studentAnswer=0"}, {"name": "correct_answer", "description": "", "definition": "if(eval(settings[\"correct_answer_expr\"]),0,1)"}], "settings": [{"name": "correct_answer_expr", "label": "Is the answer \"Yes\"?", "help_url": "", "hint": "An expression which evaluates to true or false.", "input_type": "mathematical_expression", "default_value": "true", "subvars": false}], "public_availability": "always", "published": true, "extensions": []}], "resources": []}