// Numbas version: exam_results_page_options {"feedback": {"advicethreshold": 0, "showactualmark": false, "allowrevealanswer": false, "feedbackmessages": [], "showtotalmark": true, "intro": "

This assignment must be completed within a two hour window.  All students will be presented with the same suite of questions, but numeric data will be 'randomised' within each question. 

", "showanswerstate": false}, "showstudentname": true, "name": "CSC005/MA-009 Assignment 1", "navigation": {"showresultspage": "oncompletion", "preventleave": true, "allowsteps": true, "startpassword": "", "onleave": {"action": "warnifunattempted", "message": "

You have not attempted this question!

"}, "reverse": false, "showfrontpage": true, "allowregen": false, "browse": false}, "question_groups": [{"pickQuestions": 1, "name": "Group", "pickingStrategy": "all-ordered", "questions": [{"name": "Calculation of Mean", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question is concerned with the calculation of the mean of a list, or array, of numbers.

", "advice": "", "rulesets": {}, "variables": {"a6": {"name": "a6", "group": "Ungrouped variables", "definition": "a0 + r2", "description": "", "templateType": "anything"}, "a4": {"name": "a4", "group": "Ungrouped variables", "definition": "a0 - 3*r2", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "a0 - r1", "description": "

a2

", "templateType": "anything"}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "a0 - 2*r1", "description": "", "templateType": "anything"}, "a0": {"name": "a0", "group": "Ungrouped variables", "definition": "random(22..28)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "a0 + 3*r1", "description": "", "templateType": "anything"}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "shuffle(alist)", "description": "", "templateType": "anything"}, "alist": {"name": "alist", "group": "Ungrouped variables", "definition": "[a0, a1, a2, a3, a4, a5, a6]", "description": "", "templateType": "anything"}, "a5": {"name": "a5", "group": "Ungrouped variables", "definition": "a0 + 2*r2", "description": "", "templateType": "anything"}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "meana": {"name": "meana", "group": "Ungrouped variables", "definition": "mean(a)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a0", "r1", "r2", "a1", "a2", "a3", "a4", "a5", "a6", "alist", "a", "meana"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the mean of the list {a}.

", "minValue": "meana", "maxValue": "meana", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Calculation of variance", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question is concerned with the calculation of the variance of a list, or array, of numbers.

", "advice": "", "rulesets": {}, "variables": {"a4": {"name": "a4", "group": "Ungrouped variables", "definition": "mu - 3*sigma", "description": "", "templateType": "anything"}, "a6": {"name": "a6", "group": "Ungrouped variables", "definition": "mu - sigma", "description": "", "templateType": "anything"}, "vara": {"name": "vara", "group": "Ungrouped variables", "definition": "variance(a)", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "mu + 3*sigma", "description": "", "templateType": "anything"}, "alist": {"name": "alist", "group": "Ungrouped variables", "definition": "[a0, a1, a2, a3, a4, a5, a6]", "description": "", "templateType": "anything"}, "a0": {"name": "a0", "group": "Ungrouped variables", "definition": "mu", "description": "", "templateType": "anything"}, "mu": {"name": "mu", "group": "Ungrouped variables", "definition": "random(8..12)", "description": "", "templateType": "anything"}, "a5": {"name": "a5", "group": "Ungrouped variables", "definition": "mu - 2*sigma", "description": "", "templateType": "anything"}, "sigma": {"name": "sigma", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "shuffle(alist)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "mu + sigma", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "mu + 2*sigma", "description": "

a2

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a0", "mu", "sigma", "a1", "a2", "a3", "a4", "a5", "a6", "alist", "a", "vara"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the variance of the list {a}.

", "minValue": "vara", "maxValue": "vara", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Calculation of Median", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question is concerned with the calculation of the median of a list, or array, of numbers.

", "advice": "", "rulesets": {}, "variables": {"a18": {"name": "a18", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "a13": {"name": "a13", "group": "Ungrouped variables", "definition": "Q3 - random(1..7)", "description": "", "templateType": "anything"}, "a16": {"name": "a16", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "Q1": {"name": "Q1", "group": "Ungrouped variables", "definition": "Q2 - random(8..11)", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "Q3 - random(1..7)", "description": "", "templateType": "anything"}, "a7": {"name": "a7", "group": "Ungrouped variables", "definition": "Q1 + random(1..7)", "description": "", "templateType": "anything"}, "a10": {"name": "a10", "group": "Ungrouped variables", "definition": "Q3 - random(1..7)", "description": "", "templateType": "anything"}, "alist": {"name": "alist", "group": "Ungrouped variables", "definition": "[a0, a1, a2, a3, Q1, a5, a6, a7, a8, Q2, a10, a11, a12, a13, Q3, a15, a16, a17, a18]", "description": "", "templateType": "anything"}, "a17": {"name": "a17", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "a15": {"name": "a15", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "Q3": {"name": "Q3", "group": "Ungrouped variables", "definition": "Q2 + random(8..11)", "description": "", "templateType": "anything"}, "a0": {"name": "a0", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "a8": {"name": "a8", "group": "Ungrouped variables", "definition": "Q1 + random(1..7)", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "Q3 - random(1..7)", "description": "", "templateType": "anything"}, "a5": {"name": "a5", "group": "Ungrouped variables", "definition": "Q1 + random(1..7)", "description": "", "templateType": "anything"}, "Q2": {"name": "Q2", "group": "Ungrouped variables", "definition": "random(30..34)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "shuffle(alist)", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "a6": {"name": "a6", "group": "Ungrouped variables", "definition": "Q1 + random(1..7)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["Q2", "Q1", "Q3", "a0", "a1", "a2", "a3", "a5", "a6", "a7", "a8", "a10", "a11", "a12", "a13", "a15", "a16", "a17", "a18", "alist", "a"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the median of the list {a}.

", "minValue": "Q2", "maxValue": "Q2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Calculation of Interquartile Range", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question is concerned with the calculation of the Interquartile Range of a list, or array, of numbers.

", "advice": "", "rulesets": {}, "variables": {"alist": {"name": "alist", "group": "Ungrouped variables", "definition": "[a0, a1, a2, a3, Q1, a5, a6, a7, a8, Q2, a10, a11, a12, a13, Q3, a15, a16, a17, a18]", "description": "", "templateType": "anything"}, "a0": {"name": "a0", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "a16": {"name": "a16", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "a17": {"name": "a17", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "Q3": {"name": "Q3", "group": "Ungrouped variables", "definition": "Q2 + random(8..11)", "description": "", "templateType": "anything"}, "a10": {"name": "a10", "group": "Ungrouped variables", "definition": "Q3 - random(1..7)", "description": "", "templateType": "anything"}, "a6": {"name": "a6", "group": "Ungrouped variables", "definition": "Q1 + random(1..7)", "description": "", "templateType": "anything"}, "a18": {"name": "a18", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "Q3 - random(1..7)", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "a7": {"name": "a7", "group": "Ungrouped variables", "definition": "Q1 + random(1..7)", "description": "", "templateType": "anything"}, "a13": {"name": "a13", "group": "Ungrouped variables", "definition": "Q3 - random(1..7)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "Q2": {"name": "Q2", "group": "Ungrouped variables", "definition": "random(30..34)", "description": "", "templateType": "anything"}, "Q1": {"name": "Q1", "group": "Ungrouped variables", "definition": "Q2 - random(8..11)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "shuffle(alist)", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "Q3 - random(1..7)", "description": "", "templateType": "anything"}, "a8": {"name": "a8", "group": "Ungrouped variables", "definition": "Q1 + random(1..7)", "description": "", "templateType": "anything"}, "a15": {"name": "a15", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "a5": {"name": "a5", "group": "Ungrouped variables", "definition": "Q1 + random(1..7)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["Q2", "Q1", "Q3", "a0", "a1", "a2", "a3", "a5", "a6", "a7", "a8", "a10", "a11", "a12", "a13", "a15", "a16", "a17", "a18", "alist", "a"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the lower quartile, $Q1$, of the list {a}.

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

Calculate the upper quartile, $Q3$, of the list {a}.

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

Calculate the Interquartile Range of the list {a}.

", "minValue": "Q3 - Q1", "maxValue": "Q3 - Q1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Identification of Outliers", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question is concerned with the identification of outliers in a list, or array, of numbers.

", "advice": "", "rulesets": {}, "variables": {"a8": {"name": "a8", "group": "Ungrouped variables", "definition": "Q1 + random(0..3)", "description": "", "templateType": "anything"}, "a15": {"name": "a15", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "Q3 - random(0..3)", "description": "", "templateType": "anything"}, "Q3": {"name": "Q3", "group": "Ungrouped variables", "definition": "Q2 + random(4..8)", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "Q3 - random(0..3)", "description": "", "templateType": "anything"}, "a10": {"name": "a10", "group": "Ungrouped variables", "definition": "Q3 - random(0..3)", "description": "", "templateType": "anything"}, "a0": {"name": "a0", "group": "Ungrouped variables", "definition": "Q1 - random(8..24)", "description": "", "templateType": "anything"}, "a18": {"name": "a18", "group": "Ungrouped variables", "definition": "Q3 + random(8..24)", "description": "", "templateType": "anything"}, "Q2": {"name": "Q2", "group": "Ungrouped variables", "definition": "random(30..34)", "description": "", "templateType": "anything"}, "a5": {"name": "a5", "group": "Ungrouped variables", "definition": "Q1 + random(0..3)", "description": "", "templateType": "anything"}, "outliers": {"name": "outliers", "group": "Ungrouped variables", "definition": "if(a0 < Q1 - 1.5*(Q3 - Q1) or a18 > Q3 + 1.5*(Q3 - Q1),1,0)", "description": "", "templateType": "anything"}, "a17": {"name": "a17", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "a7": {"name": "a7", "group": "Ungrouped variables", "definition": "Q1 + random(0..3)", "description": "", "templateType": "anything"}, "a6": {"name": "a6", "group": "Ungrouped variables", "definition": "Q1 + random(0..3)", "description": "", "templateType": "anything"}, "alist": {"name": "alist", "group": "Ungrouped variables", "definition": "[a0, a1, a2, a3, Q1, a5, a6, a7, a8, Q2, a10, a11, a12, a13, Q3, a15, a16, a17, a18]", "description": "", "templateType": "anything"}, "a16": {"name": "a16", "group": "Ungrouped variables", "definition": "Q3 + random(1..7)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "shuffle(alist)", "description": "", "templateType": "anything"}, "Q1": {"name": "Q1", "group": "Ungrouped variables", "definition": "Q2 - random(4..8)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}, "a13": {"name": "a13", "group": "Ungrouped variables", "definition": "Q3 - random(0..3)", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "Q1 - random(1..7)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["Q2", "Q1", "Q3", "a0", "a1", "a2", "a3", "a5", "a6", "a7", "a8", "a10", "a11", "a12", "a13", "a15", "a16", "a17", "a18", "alist", "a", "outliers"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Are there outliers in the list {a}?  Answer 1 for 'Yes' and 0 for 'No

", "minValue": "outliers", "maxValue": "outliers", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Histogram Bin Counts", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "preamble": {"js": "", "css": ""}, "tags": [], "advice": "", "functions": {}, "ungrouped_variables": ["b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "b10", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "blist", "dlist", "r", "bins", "data"], "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "customName": "", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "useCustomName": false, "marks": 0, "type": "gapfill", "sortAnswers": false, "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "gaps": [{"scripts": {}, "showFeedbackIcon": false, "useCustomName": false, "customName": "", "showCorrectAnswer": false, "maxValue": "bins[0]", "showFractionHint": true, "allowFractions": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "marks": 1, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "minValue": "bins[0]", "adaptiveMarkingPenalty": 0, "mustBeReducedPC": 0, "unitTests": []}, {"scripts": {}, "showFeedbackIcon": false, "useCustomName": false, "customName": "", "showCorrectAnswer": false, "maxValue": "bins[1]", "showFractionHint": true, "allowFractions": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "marks": 1, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "minValue": "bins[1]", "adaptiveMarkingPenalty": 0, "mustBeReducedPC": 0, "unitTests": []}, {"scripts": {}, "showFeedbackIcon": false, "useCustomName": false, "customName": "", "showCorrectAnswer": false, "maxValue": "bins[2]", "showFractionHint": true, "allowFractions": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "marks": 1, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "minValue": "bins[2]", "adaptiveMarkingPenalty": 0, "mustBeReducedPC": 0, "unitTests": []}, {"scripts": {}, "showFeedbackIcon": false, "useCustomName": false, "customName": "", "showCorrectAnswer": false, "maxValue": "bins[3]", "showFractionHint": true, "allowFractions": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "marks": 1, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "minValue": "bins[3]", "adaptiveMarkingPenalty": 0, "mustBeReducedPC": 0, "unitTests": []}, {"scripts": {}, "showFeedbackIcon": false, "useCustomName": false, "customName": "", "showCorrectAnswer": false, "maxValue": "bins[4]", "showFractionHint": true, "allowFractions": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "marks": 1, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "minValue": "bins[4]", "adaptiveMarkingPenalty": 0, "mustBeReducedPC": 0, "unitTests": []}, {"scripts": {}, "showFeedbackIcon": false, "useCustomName": false, "customName": "", "showCorrectAnswer": false, "maxValue": "bins[5]", "showFractionHint": true, "allowFractions": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "marks": 1, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "minValue": "bins[5]", "adaptiveMarkingPenalty": 0, "mustBeReducedPC": 0, "unitTests": []}, {"scripts": {}, "showFeedbackIcon": false, "useCustomName": false, "customName": "", "showCorrectAnswer": false, "maxValue": "bins[6]", "showFractionHint": true, "allowFractions": false, "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "marks": 1, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "minValue": "bins[6]", "adaptiveMarkingPenalty": 0, "mustBeReducedPC": 0, "unitTests": []}], "prompt": "

For the following data

\n

 {data}

\n

record the bin counts in the array below.

\n

[[[0]], [[1]], [[2]], [[3]], [[4]], [[5]], [[6]]]

", "unitTests": [], "variableReplacements": [], "extendBaseMarkingAlgorithm": true}], "rulesets": {}, "variables": {"d8": {"definition": "[6.63, 5.25, 5.14, 16.85, 12.26, 11.58, 9.73, 8.52, 4.18, 14.37, 11.42, 13.86, 11.58, 9.93, 10.74, 14.97, 10.48, 15.68, 7.31, 12.74]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d8"}, "b10": {"definition": "[4, 0, 0, 8, 3, 2, 3]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b10"}, "d9": {"definition": "[14.85, 14.26, 7.86, 8.74, 11.93, 12.18, 14.63, 6.97, 14.48, 8.74, 7.58, 14.37, 5.73, 11.14, 3.58, 13.25, 7.31, 15.42, 9.68, 16.52]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d9"}, "d3": {"definition": "[12.97, 8.63, 14.26, 7.42, 3.68, 14.74, 10.74, 4.18, 3.25, 7.14, 12.48, 13.93, 16.85, 13.31, 3.73, 7.58, 14.37, 8.52, 11.86, 11.58]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d3"}, "bins": {"definition": "blist[r]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "bins"}, "b4": {"definition": "[2, 3, 0, 0, 4, 8, 3]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b4"}, "b1": {"definition": "[4, 2, 1, 0, 2, 4, 7]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b1"}, "d2": {"definition": "[8.37, 9.73, 10.48, 5.58, 14.85, 11.86, 11.58, 11.42, 10.18, 7.31, 9.14, 13.25, 4.63, 11.68, 16.74, 8.52, 10.97, 6.74, 8.26, 9.93]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d2"}, "b3": {"definition": "[4, 0, 5, 1, 4, 5, 1]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b3"}, "b9": {"definition": "[1, 2, 5, 1, 3, 6, 2]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b9"}, "d7": {"definition": "[13.73, 10.48, 13.58, 8.37, 10.74, 12.52, 12.74, 16.85, 7.93, 7.86, 12.18, 11.68, 11.31, 7.25, 12.26, 15.42, 16.97, 3.58, 15.14, 8.63]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d7"}, "r": {"definition": "random(0..10)", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "r"}, "b6": {"definition": "[0, 6, 0, 8, 0, 6, 0]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b6"}, "d4": {"definition": "[14.26, 15.93, 14.18, 13.73, 4.48, 15.68, 11.31, 5.42, 12.52, 11.25, 5.86, 14.63, 13.58, 15.14, 12.97, 14.74, 14.85, 6.37, 4.74, 13.58]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d4"}, "d5": {"definition": "[16.97, 11.93, 4.37, 15.31, 5.25, 9.14, 8.63, 5.58, 7.86, 11.73, 8.52, 15.42, 11.68, 12.48, 4.74, 7.58, 4.18, 12.74, 4.26, 10.85]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d5"}, "blist": {"definition": "[b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "blist"}, "dlist": {"definition": "[d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "dlist"}, "b2": {"definition": "[1, 2, 4, 6, 4, 2, 1]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b2"}, "b5": {"definition": "[4, 2, 4, 2, 5, 0, 3]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b5"}, "d1": {"definition": "[16.48, 16.37, 15.86, 3.14, 11.31, 15.73, 14.26, 6.18, 16.52, 8.97, 3.25, 16.74, 3.42, 15.93, 5.58, 14.85, 14.63, 13.58, 12.74, 3.68]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d1"}, "data": {"definition": "shuffle(dlist[r])", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "data"}, "b0": {"definition": "[3, 6, 1, 3, 5, 0, 2]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b0"}, "d6": {"definition": "[6.85, 5.58, 10.26, 6.37, 9.31, 6.48, 10.18, 9.73, 9.93, 5.25, 13.58, 14.97, 9.68, 14.63, 14.52, 14.74, 9.86, 14.74, 5.42, 9.14]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d6"}, "b8": {"definition": "[1, 3, 2, 4, 5, 3, 2]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b8"}, "d10": {"definition": "[10.37, 10.63, 16.18, 10.52, 16.74, 3.42, 10.85, 11.25, 14.48, 11.14, 10.74, 16.97, 9.68, 3.31, 11.93, 4.26, 9.58, 9.86, 3.73, 13.58]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "d10"}, "b7": {"definition": "[1, 0, 5, 2, 6, 2, 4]", "group": "Ungrouped variables", "description": "", "templateType": "anything", "name": "b7"}, "d0": {"definition": "[4.97, 16.26, 11.93, 10.63, 6.74, 5.68, 15.42, 12.37, 6.74, 5.31, 9.14, 11.73, 4.18, 12.85, 5.58, 5.25, 4.52, 12.48, 9.86, 7.58]", "group": "Ungrouped variables", "description": "

d0

", "templateType": "anything", "name": "d0"}}, "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question requires analysis of a list, or array, of numbers to determine the number of data points falling into each of 7 bins.  The bin boundaries are set to be [3, 5, 7, 9, 11, 13, 15, 17].

", "variable_groups": []}, {"name": "How many Permutations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question requires you to calculate the number of possible Permutations for $k$ choices and $n$ objects.  The choice is without repetition but with regard to order. 

", "advice": "", "rulesets": {}, "variables": {"k": {"name": "k", "group": "Ungrouped variables", "definition": "random(2..(n-2))", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(4..10)", "description": "", "templateType": "anything"}, "perms": {"name": "perms", "group": "Ungrouped variables", "definition": "fact(n)/fact(n - k)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "k", "perms"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How many ways can one choose {k} objects from a total of {n} objects, without repetition but with regard to their order?

", "minValue": "perms", "maxValue": "perms", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "How many Combinations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question requires you to calculate the number of possible Combinations for $k$ choices and $n$ objects.  The choice is without repetition and without regard to order. 

", "advice": "", "rulesets": {}, "variables": {"combs": {"name": "combs", "group": "Ungrouped variables", "definition": "fact(n)/(fact(n - k) * fact(k))", "description": "", "templateType": "anything"}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(2..(n-2))", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(4..10)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "k", "combs"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How many ways can one choose {k} objects from a total of {n} objects, without repetition and without regard to their order?

", "minValue": "combs", "maxValue": "combs", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Probability of union of two events", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question requires the calculation of $P( A \\cup B )$ given $P(A)$ and $P( A \\cap B )$.

", "advice": "", "rulesets": {}, "variables": {"pacupb": {"name": "pacupb", "group": "Ungrouped variables", "definition": "pa + pb - pab", "description": "", "templateType": "anything"}, "pab": {"name": "pab", "group": "Ungrouped variables", "definition": "random(0..pa#0)", "description": "", "templateType": "anything"}, "pb": {"name": "pb", "group": "Ungrouped variables", "definition": "pab/pa", "description": "", "templateType": "anything"}, "pa": {"name": "pa", "group": "Ungrouped variables", "definition": "random(0..1#0)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["pa", "pab", "pb", "pacupb"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

For the independent events $A$ and $B$ with $P(A) = \\var{pa}$ and $P(A \\cap B) = \\var{pab}$ calculate $P(A \\cup B)$.

", "minValue": "pacupb - 0.001", "maxValue": "pacupb + 0.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Probability of union of three events", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question requires the calculation of $P( A \\cup B \\cup C )$ given $P(A)$, $P(B)$, $P(C)$, and the probabilities of all possible intersections of the events $A, B, C$.

", "advice": "", "rulesets": {}, "variables": {"pehb": {"name": "pehb", "group": "Ungrouped variables", "definition": "random(0..1.0 - pa#0)", "description": "", "templateType": "anything"}, "pehbc": {"name": "pehbc", "group": "Ungrouped variables", "definition": "random(0.0..pehb#0)", "description": "", "templateType": "anything"}, "pab": {"name": "pab", "group": "Ungrouped variables", "definition": "random(0..pa#0)", "description": "", "templateType": "anything"}, "union": {"name": "union", "group": "Ungrouped variables", "definition": "pa + pb + pc -pab - pbc - pca + pabc", "description": "", "templateType": "anything"}, "pehbec": {"name": "pehbec", "group": "Ungrouped variables", "definition": "random(0.0..(1.0 - pa - pehb)#0)", "description": "", "templateType": "anything"}, "pabc": {"name": "pabc", "group": "Ungrouped variables", "definition": "random(0.0..pab#0)", "description": "", "templateType": "anything"}, "pa": {"name": "pa", "group": "Ungrouped variables", "definition": "random(0..1#0)", "description": "", "templateType": "anything"}, "pc": {"name": "pc", "group": "Ungrouped variables", "definition": "pabc + pehbc + pabec + pehbec", "description": "", "templateType": "anything"}, "pb": {"name": "pb", "group": "Ungrouped variables", "definition": "pab + pehb", "description": "", "templateType": "anything"}, "pbc": {"name": "pbc", "group": "Ungrouped variables", "definition": "pabc + pehbc", "description": "", "templateType": "anything"}, "pabec": {"name": "pabec", "group": "Ungrouped variables", "definition": "random(0.0..(pa - pab)#0)", "description": "", "templateType": "anything"}, "pca": {"name": "pca", "group": "Ungrouped variables", "definition": "pabc + pabec", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["pa", "pab", "pehb", "pabc", "pabec", "pehbc", "pehbec", "pb", "pc", "pca", "pbc", "union"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Given the probabilities listed below calculate $P(A \\cup B \\cup C)$.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
EventProbability
$A$$\\var{pa}$
$B$$\\var{pb}$
$C$$\\var{pc}$
$A \\cap B$$\\var{pab}$
$B \\cap C$$\\var{pbc}$
$C \\cap A$$\\var{pca}$
$A \\cap B \\cap C$$\\var{pabc}$
\n

", "minValue": "union - 0.001", "maxValue": "union + 0.001", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Code Comprehension", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "

This question requires matching Python code to Mathematical forms.

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

Match the Python code to the corresponding Mathematical output.

", "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "shuffleAnswers": true, "displayType": "checkbox", "warningType": "none", "showCellAnswerState": false, "markingMethod": "sum ticked cells", "choices": ["
### BEGIN CODE ###
quan = 0
n = len(a)
for i in range(n):
    quan = quan + a[i]
### END CODE ###", "
### BEGIN CODE ###
quan = 1
n = len(a)
for i in range(n):
    quan = quan * a[i]
### END CODE ###", "
### BEGIN CODE ###
def func(n, k):
    quan = 1
    for i in range(k):
        quan = quan * (n - i)
    return(quan)
### END CODE ###", "
### BEGIN CODE ###
def func(n):
    quan = 1
    for i in range(n):
        quan = quan * (n - i)
    return(quan)
### END CODE ###
", "
### BEGIN CODE ###
def func(a):
    n = len(a)
    a = sort(a)
    if n%2 == 0:
        quan = ( a[n//2 - 1] + a[n//2])/2
    else:
        quan = a[n//2]
    return(quan)
### END CODE ###"], "matrix": [["1", 0, 0, 0, 0], [0, "1", 0, 0, 0], [0, 0, "1", 0, 0], [0, 0, 0, "1", 0], [0, 0, 0, 0, "1"]], "layout": {"type": "all", "expression": ""}, "answers": ["$\\sum_{i = 0}^{n-1} a_i$", "$\\prod_{i = 0}^{n-1} a_i$", "$P^n_k$", "$n!$", "median(a)"]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "percentPass": "40", "metadata": {"description": "This assignment tests your comprehension of the material presented in lectures ( and labs ) up to and including the lecture on Thursday 7th November.  Please answer the questions without the aid of a computer ( calculators are allowable ) as you won't have access to one in the January examination.  The questions require the calculation of either a specific number, making a true/false choice, or matching code to mathematics.  The numeric data within a question will have been randomised ( generated form a highly specified template ).", "licence": "All rights reserved"}, "showQuestionGroupNames": false, "timing": {"allowPause": false, "timeout": {"action": "warn", "message": "

Your allocated time has come to an end.

"}, "timedwarning": {"action": "warn", "message": "

You have only five minutes left.

"}}, "duration": 7200, "contributors": [{"name": "Ian Davies", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3119/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}