// Numbas version: finer_feedback_settings {"name": "Numbas v10.0 demo", "metadata": {"description": "

Questions demonstrating the new features in Numbas v10.0.

", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": true, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Notation", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "JME notations", "extensions": ["programming", "stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "

Demonstrates the new JME notations feature.

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

This question demonstrates a few of the new mathematical notations supported by Numbas v10.

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"q": {"name": "q", "group": "Ungrouped variables", "definition": "eval(parse(\"(1,4] - [2,3)\",\"real_interval\"))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["q"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": true, "customName": "Set theory", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "notation: settings[\"notation\"]\n\nstudentExpr (The student's answer, parsed):\n apply(studentExpr_empty);\n try(\n simplify(\n expand_juxtapositions(parse(studentAnswer, notation), evaluation_scope, expand_juxtapositions_settings),\n 'basic'\n )\n , message,\n warn(translate(\"part.jme.answer invalid\",[\"message\":message]));\n fail(translate(\"part.jme.answer invalid\",[\"message\":message]));\n nothing\n )\n\ncorrectExpr (The correct answer, parsed):\n expand_juxtapositions(parse(settings[\"correctAnswerString\"], notation), evaluation_scope, expand_juxtapositions_settings)\n", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Write a set containing $1$, $2$ and x.

\n

Try {1,2,x}.

", "answer": "{1,2,x} ", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "set_theory", "mustmatchpattern": {"pattern": "set([1,?])", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [], "functionsets": ["extension:stats", "extension:programming", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "Square brackets for grouping", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "notation: settings[\"notation\"]\n\nstudentExpr (The student's answer, parsed):\n apply(studentExpr_empty);\n try(\n simplify(\n expand_juxtapositions(parse(studentAnswer, notation), evaluation_scope, expand_juxtapositions_settings),\n 'basic'\n )\n , message,\n warn(translate(\"part.jme.answer invalid\",[\"message\":message]));\n fail(translate(\"part.jme.answer invalid\",[\"message\":message]));\n nothing\n )\n\ncorrectExpr (The correct answer, parsed):\n expand_juxtapositions(parse(settings[\"correctAnswerString\"], notation), evaluation_scope, expand_juxtapositions_settings)\n", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Write

\n

\\[\\simplify{((1+a)/3 + b)/(a+b) }\\]

\n

You may use square brackets [ and ] for grouping.

\n

Try [(1+a)/3+b]/[a+b].

", "answer": "([1+a]/3 + b)/[a+b] ", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "square_brackets_grouping", "valuegenerators": [{"name": "a", "value": "[1+2000]*random(vrange)"}, {"name": "b", "value": ""}], "functionsets": ["extension:stats", "extension:programming", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "Boolean logic", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Write $f(a) \\vee b$.

\n

You can use + for OR and * for AND.

\n

Try f(a) + b.

", "answer": "f(a) + b", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "boolean_logic", "valuegenerators": [{"name": "a", "value": "random(true, false)"}, {"name": "b", "value": "random(true, false)"}, {"name": "f", "value": "random(x -> x, x -> not x)"}], "functionsets": ["extension:stats", "extension:programming", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "Vectors", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Write $\\simplify{dot(vector(1,2),vector(x,y))}$.

\n

For a vector like $\\simplify{vector(a,b)}$, write (a,b).

\n

For $a \\cdot b$, write <a,b>.

\n

Try <(1,2),(x,y)>.

", "answer": "<(1,2),(x,y)>", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "vector_shorthand", "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}], "functionsets": ["extension:stats", "extension:programming", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "Real intervals", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Write the interval containing the numbers from 1 up to but not including 3.

\n

Try [1,3).

", "answer": "[1,3)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "real_interval", "valuegenerators": [], "functionsets": ["extension:stats", "extension:programming", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Allowed function sets", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "

Demonstrates how you can restrict the functions available to the student in a mathematical expression part.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Define $\\cos(x)$ using only arithmetic operations and the function $\\sin$.

", "answer": "sin(x+pi/2)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "valuegenerators": [{"name": "x", "value": ""}], "functionsets": ["arithmetic"], "enabledfunctions": ["sin", "sqrt"], "disabledfunctions": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Constructive real number data type", "extensions": ["constructive-real-numbers"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "

Demo for the constructive real number extension.

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

The correct answer to both parts of this question is $e^x + e^{-x}$.

\n

The first part uses constructive real numbers. Calculations with constructive real numbers are guaranteed to be correct, so only identically equivalent expressions will be marked as correct.

\n

(This isn't strictly true: comparison of constructive reals works by finding the most significant digit of the difference between the two numbers. When they're equal, the difference is zero, which doesn't have a most significant digit. So we have to set an upper limit on the number of digits that can be computed. In this question, the limit is about 200 digits, which is enough to correctly check any realistic answer)

\n

The second part uses standard floating-point numbers. Each calculation with floats is rounded off to a fixed precision, so alternate forms of the same expression can produce different float values.

\n

In both parts, value of $x$ are chosen from the range $[100,200]$.

\n

Try the following expressions with both types:

\n", "advice": "", "rulesets": {}, "builtin_constants": {"e": false, "pi,\u03c0": false, "i": true, "j": false}, "constants": [{"name": "e", "value": "creal(\"e\")", "tex": "e"}, {"name": "pi", "value": "creal(\"pi\")", "tex": "\\pi"}], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": true, "customName": "Constructive reals", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "precision (The number of binary digits to check for equality):\n ceil(200*log(10,2))\n\nagree:\n apply(vset);\n map(\n try(\n let(\n scope, case_sensitive(evaluation_scope, settings[\"caseSensitive\"]),\n sign(eval(studentCompare,scope,vars) - eval(correctCompare,scope,vars), -precision) = 0\n ),\n message,\n warn(translate(\"part.jme.answer invalid\",[\"message\":message]));\n fail(translate(\"part.jme.answer invalid\",[\"message\":message]));\n false\n ),\n vars,\n vset\n )\n\ndefault_value_generator:\n base_default_value_generator + [\n \"number\": expression(\"creal(random(vRange))\"),\n \"creal\": expression(\"creal(random(vRange))\"),\n ]", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "e^x + e^(-x)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": ["100", "200"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "creal", "valuegenerators": [{"name": "x", "value": ""}], "functionsets": ["extension:constructive-real-numbers", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "Standard floats", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "e^x + e^(-x)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": ["100", "200"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "valuegenerators": [{"name": "x", "value": ""}], "functionsets": ["extension:constructive-real-numbers", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}]}, {"name": "Asynchronous variable generation", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [""], "variable_overrides": [[]], "questions": [{"name": "Use the Tyne and Wear Metro API", "extensions": ["programming"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "

Shows how to fetch data from an external API and use it in question variables.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"train_data": {"name": "train_data", "group": "Train data", "definition": "fetch_json(api_url)", "description": "", "templateType": "anything", "can_override": false}, "trains": {"name": "trains", "group": "Train data", "definition": "train_data[\"trains\"]", "description": "", "templateType": "anything", "can_override": false}, "num_trains": {"name": "num_trains", "group": "Train data", "definition": "len(trains)", "description": "", "templateType": "anything", "can_override": false}, "last_events": {"name": "last_events", "group": "Train data", "definition": "t[\"status\"][\"timesAPI\"][\"lastEvent\"][\"type\"] for: t of: values(trains)", "description": "", "templateType": "anything", "can_override": false}, "num_arriving": {"name": "num_arriving", "group": "Train data", "definition": "len(x for: x of: last_events where: x = status)", "description": "

The number of trains that have just arrived at a station.

", "templateType": "anything", "can_override": false}, "train_table": {"name": "train_table", "group": "Train data", "definition": "table(\n [number, d[\"status\"][\"timesAPI\"][\"lastEvent\"][\"type\"], d[\"status\"][\"timesAPI\"][\"lastEvent\"][\"location\"]] for: [number, d] of: items(trains),\n [\"Train\", \"Status\", \"Location\"]\n)", "description": "", "templateType": "anything", "can_override": false}, "api_url": {"name": "api_url", "group": "Ungrouped variables", "definition": "\"https://metro.hopperelec.co.uk/api/trains\"", "description": "", "templateType": "anything", "can_override": false}, "possible_statuses": {"name": "possible_statuses", "group": "Train data", "definition": "[ \"ARRIVED\", \"DEPARTED\", \"APPROACHING\" ]", "description": "", "templateType": "list of strings", "can_override": false}, "status": {"name": "status", "group": "Train data", "definition": "random(possible_statuses)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["api_url"], "variable_groups": [{"name": "Train data", "variables": ["train_data", "trains", "num_trains", "last_events", "possible_statuses", "status", "num_arriving", "train_table"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

The table below displays the status of every train on the Tyne and Wear Metro network.

\n

This data was loaded from {api_url} when this question was generated.

\n

{train_table}

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

How many trains are currently on the network?

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

How many trains have the status {status}?

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

Click \"Try another question like this one\" to try again with the most recent data.

"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}]}, {"name": "Display options", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "Explore mode: show all the parts at once", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "

Demonstrates the option to show all explore mode parts at once.

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

This question is in explore mode - the parts shown depend on how you interact with it - but all of the existing parts are shown at once.

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"n": {"name": "n", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "Start", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Even", "rawLabel": "", "otherPart": 1, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "credit=1 and interpreted_answer > 1 and mod(interpreted_answer,2)=0", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Odd", "rawLabel": "", "otherPart": 2, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "credit=1 and interpreted_answer > 1 and mod(interpreted_answer,2)=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "One", "rawLabel": "", "otherPart": 3, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "credit=1 and interpreted_answer=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Write a positive whole number.

", "minValue": "1", "maxValue": "infinity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Even", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Even", "rawLabel": "", "otherPart": 1, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "credit=1 and interpreted_answer > 1 and mod(interpreted_answer,2)=0", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Odd", "rawLabel": "", "otherPart": 2, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "credit=1 and interpreted_answer > 1 and mod(interpreted_answer,2)=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "One", "rawLabel": "", "otherPart": 3, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "credit=1 and interpreted_answer=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Your number is $\\var{n}$. Halve it.

", "minValue": "n/2", "maxValue": "n/2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Odd", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Even", "rawLabel": "", "otherPart": 1, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "credit=1 and interpreted_answer > 1 and mod(interpreted_answer,2)=0", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Odd", "rawLabel": "", "otherPart": 2, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "credit=1 and interpreted_answer > 1 and mod(interpreted_answer,2)=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "One", "rawLabel": "", "otherPart": 3, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "credit=1 and interpreted_answer=1", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Your number is $x = \\var{n}$. Calculate $3x+1$.

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

You reached 1!

"}], "partsMode": "explore", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": true}, {"name": "Matrix grid lines", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "

Demonstrates the new option to add vertical and horizontal grid lines to matrix entry parts.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"pre_filled_cells": {"name": "pre_filled_cells", "group": "Ungrouped variables", "definition": "[\n[\" \",\" \",\" \",\" \",\" \",\"7\",\"9\",\"5\",\" \"],\n[\" \",\" \",\" \",\" \",\"3\",\" \",\" \",\" \",\"8\"],\n[\"2\",\" \",\"5\",\"8\",\" \",\" \",\"6\",\" \",\"7\"],\n[\" \",\"8\",\" \",\" \",\"7\",\" \",\" \",\"6\",\"3\"],\n[\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \"],\n[\"3\",\"4\",\" \",\" \",\"2\",\" \",\" \",\"7\",\" \"],\n[\"9\",\" \",\"1\",\" \",\" \",\"8\",\"5\",\" \",\"4\"],\n[\"6\",\" \",\" \",\" \",\"5\",\" \",\" \",\" \",\" \"],\n[\" \",\"5\",\"8\",\"7\",\" \",\" \",\" \",\" \",\" \"],\n]", "description": "", "templateType": "anything", "can_override": false}, "solved_sudoku": {"name": "solved_sudoku", "group": "Ungrouped variables", "definition": "matrix(\n [8,3,4,6,1,7,9,5,2],\n [7,9,6,2,3,5,1,4,8],\n [2,1,5,8,4,9,6,3,7],\n [5,8,2,9,7,1,4,6,3],\n [1,6,7,4,8,3,2,9,5],\n [3,4,9,5,2,6,8,7,1],\n [9,7,1,3,6,8,5,2,4],\n [6,2,3,1,5,4,7,8,9],\n [4,5,8,7,9,2,3,1,6]\n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["pre_filled_cells", "solved_sudoku"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

In this part, there is a vertical line before the last column. Try changing the number of columns.

", "correctAnswer": "id(2)", "correctAnswerFractions": false, "numRows": "3", "numColumns": "2", "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": "", "gridlines": "beforeLastColumn", "gridlinesCustomRows": "repeat(false, numrows-1)", "gridlinesCustomColumns": "repeat(false, numcolumns-1)"}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

In this part, custom gridlines expressions put vertical and horizontal lines dividing the grid into 3×3 blocks. It looks a bit like a Sudoku, don't you think?

", "correctAnswer": "solved_sudoku", "correctAnswerFractions": false, "numRows": "9", "numColumns": "9", "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": "pre_filled_cells", "gridlines": "custom", "gridlinesCustomRows": "mod(i,3) = 2 for: i of: 0..(numrows-1)", "gridlinesCustomColumns": "mod(i,3) = 2 for: i of: 0..(numcolumns-1)"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Show gap-fill expected answers in a single block", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "

Demonstrates the new option to show the expected answers for a gap-fill part as a single block, instead of a block for each gap.

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

Reveal the answers to this question. In the first part, the expected answers are shown in a single block, using the new option. In the second part, the expected answer for each gap is shown inline, next to that gap.

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "All answers in one block", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

My dog is [[0]] years old and goes for [[1]] walks a day. Her name is [[2]].

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Age", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "12", "maxValue": "12", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Walks per day", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "3", "maxValue": "3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "patternmatch", "useCustomName": true, "customName": "Name", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "Poppy", "displayAnswer": "", "matchMode": "exact", "allowEmpty": false}], "sortAnswers": false, "inlineCorrectAnswer": false}, {"type": "gapfill", "useCustomName": true, "customName": "Inline answers", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

My dog is [[0]] years old and goes for [[1]] walks a day. Her name is [[2]].

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Age", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "12", "maxValue": "12", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Walks per day", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minValue": "3", "maxValue": "3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "patternmatch", "useCustomName": true, "customName": "Name", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "Poppy", "displayAnswer": "", "matchMode": "exact", "allowEmpty": false}], "sortAnswers": false, "inlineCorrectAnswer": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}]}, {"name": "Other new features", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", ""], "variable_overrides": [[], []], "questions": [{"name": "Only replace variables in adaptive marking if a condition is met", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "

Demonstrates the new ability to set a condition for using a part's answer in adaptive marking.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"m": {"name": "m", "group": "Ungrouped variables", "definition": "matrix([1,2],[3,4])", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "m"], "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, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Write a number $a$, between 1 and 10.

\n

$a$ = [[0]]

\n

Try writing a number outside that range, and then answer part b.

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "$a$", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "1 <= studentNumber <= 10", "adaptiveMarkingNotUsedMessage": "Your number is not in the right range.", "exploreObjective": null, "minValue": "1", "maxValue": "10", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "a", "part": "p0g0", "must_go_first": true}], "variableReplacementStrategy": "alwaysreplace", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

What is $2a$?

", "minValue": "2a", "maxValue": "2a", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "mark:\n correctif(det(studentMatrix) <> 0, \"Your matrix is invertible.\", \"Your matrix is not invertible.\")", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "studentMatrix <> id(2)", "adaptiveMarkingNotUsedMessage": "The identity matrix is too easy to invert! Write a different one.", "exploreObjective": null, "prompt": "

Write an invertible matrix.

\n

Try writing the identity matrix $\\var{id(2)}$. Your answer will not be used in part d.

", "correctAnswer": "m", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": "", "gridlines": "none", "gridlinesCustomRows": "repeat(false, numrows-1)", "gridlinesCustomColumns": "repeat(false, numcolumns-1)"}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [{"variable": "m", "part": "p2", "must_go_first": true}], "variableReplacementStrategy": "alwaysreplace", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

What's the inverse of your matrix?

", "correctAnswer": "inverse(m)", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": "", "gridlines": "none", "gridlinesCustomRows": "repeat(false, numrows-1)", "gridlinesCustomColumns": "repeat(false, numcolumns-1)"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false}, {"name": "Options for the form of the answer to multiple response parts", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "tags": [], "metadata": {"description": "

Demonstrates the new ability to choose the form the student's answer to multiple response part, when used in variable replacements.

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

This question demonstrates how the new options for the form of the answer to multiple response parts make it easier to use answers in later parts.

\n

Let's make a Geordie!

", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"areas": {"name": "areas", "group": "Area", "definition": "[ \"Byker\", \"Wallsend\", \"Gosforth\", \"Fenham\", \"Walker\", \"Heaton\" ]", "description": "

Areas of Newcastle.

", "templateType": "list of strings", "can_override": false}, "hobbies": {"name": "hobbies", "group": "Hobbies", "definition": "[ \"Guitar\", \"Kitesurfing\", \"Jigsaws\", \"Football\", \"Long walks\", \"Cooking\", \"Shopping\" ]", "description": "

Hobbies the Geordie might have

", "templateType": "list of strings", "can_override": false}, "area": {"name": "area", "group": "Area", "definition": "areas[0]", "description": "

The area that the student chose.

", "templateType": "anything", "can_override": false}, "chosen_hobbies": {"name": "chosen_hobbies", "group": "Hobbies", "definition": "[]", "description": "

The hobbies the student chose.

", "templateType": "anything", "can_override": false}, "skills": {"name": "skills", "group": "Skills", "definition": "[ \"Drinking broon ale\", \"Singing \\\"fog on the Tyne\\\"\", \"Wearing short sleeves year-round\" ]", "description": "

Skills the Geordie can have.

", "templateType": "list of strings", "can_override": false}, "skill_points": {"name": "skill_points", "group": "Skills", "definition": "[]", "description": "

The pairs (points, skill) that the student allocated.

", "templateType": "anything", "can_override": false}, "skill_table": {"name": "skill_table", "group": "Skills", "definition": "table(reverse(r) for: r of: skill_points, [\"Skill\", \"Skill points\"])", "description": "

A table showing the skills.

", "templateType": "anything", "can_override": false}, "skill_values": {"name": "skill_values", "group": "Skills", "definition": "[ \"0\", \"1\", \"2\", \"3\" ]", "description": "

Possible numbers of skill points.

", "templateType": "list of strings", "can_override": false}, "full_name": {"name": "full_name", "group": "Name", "definition": "random(\"{f} {random(last_names except l)}\" for: [f,l] of: zip(first_names, last_names))", "description": "

A random name for the Geordie. Designed not to pick a real first-name/last-name pair.

", "templateType": "anything", "can_override": false}, "first_names": {"name": "first_names", "group": "Name", "definition": "[ \"Paul\", \"Cheryl\", \"Alan\", \"Ant\", \"Dec\", \"Lauren\", \"Donna\", \"Denise\" ]", "description": "

First names of some Geordies.

", "templateType": "list of strings", "can_override": false}, "last_names": {"name": "last_names", "group": "Name", "definition": "[ \"Gascoigne\", \"Tweedy\", \"Shearer\", \"McPartlin\", \"Donnelly\", \"Laverne\", \"Air\", \"Welch\" ]", "description": "

Last names of some Geordies.

", "templateType": "list of strings", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Area", "variables": ["areas", "area"]}, {"name": "Hobbies", "variables": ["hobbies", "chosen_hobbies"]}, {"name": "Skills", "variables": ["skills", "skill_values", "skill_points", "skill_table"]}, {"name": "Name", "variables": ["full_name", "first_names", "last_names"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "1_n_2", "useCustomName": true, "customName": "Home", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Hobbies", "rawLabel": "", "otherPart": 1, "variableReplacements": [{"variable": "area", "definition": "interpreted_answer"}], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Which bit of Newcastle are they from?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": false, "interpretedAnswerForm": "text of choice", "choices": "areas", "matrix": "repeat(1,len(areas))"}, {"type": "m_n_2", "useCustomName": true, "customName": "Hobbies", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Skills", "rawLabel": "", "otherPart": 2, "variableReplacements": [{"variable": "chosen_hobbies", "definition": "interpreted_answer"}], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

What are their hobbies?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "interpretedAnswerForm": "text of choices", "choices": "hobbies", "matrix": "repeat(1,len(hobbies))"}, {"type": "m_n_x", "useCustomName": true, "customName": "Skills", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Character sheet", "rawLabel": "", "otherPart": 3, "variableReplacements": [{"variable": "skill_points", "definition": "interpreted_answer"}], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

What are their skills?

", "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": false, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "interpretedAnswerForm": "text of pairs", "choices": "skills", "matrix": "repeat(repeat(1,len(skill_values)),len(skills))", "layout": {"type": "all", "expression": ""}, "answers": "skill_values", "choicesHeader": "Skill", "answersHeader": "Skill points"}, {"type": "information", "useCustomName": true, "customName": "Character sheet", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "

Here's your Geordie's character sheet:

\n

Name: {full_name}

\n

Home: {area}

\n

Hobbies: {join(chosen_hobbies, \", \")}

\n

Skills:

\n

{skill_table}

\n

Canny: why aye!

"}], "partsMode": "explore", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": true}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": false, "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": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview", "allowrevealanswer": true, "intro": "

This exam contains questions demonstrating the new features in Numbas v10.

\n

Read the release blog post for more information.

", "end_message": "", "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "reviewshowexpectedanswer": true, "showanswerstate": true, "reviewshowfeedback": true, "showactualmark": true, "showtotalmark": true, "reviewshowscore": true, "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/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "extensions": ["constructive-real-numbers", "programming", "stats"], "custom_part_types": [], "resources": []}