// Numbas version: finer_feedback_settings {"name": "Ioannis's copy of Lois's copy of Single ball from box", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "name": "Ioannis's copy of Lois's copy of Single ball from box", "advice": "

For any event $A$ 

\n

Probability of $A$ = $\\frac{\\text{Number of outcomes for which A happens}} {\\text{Total number of outcomes (sample space)}}$.

\n

\n

Let $A$ represent the outcome that the ball selected is $\\var{colour}$, then $P(A) =\\frac{\\var{answernum}}{\\var{m}+\\var{n}}$.

\n

For more explanation, look for relevant resources in the Maths for Computing section of our Maths Study Skills page.

", "functions": {}, "variable_groups": [], "ungrouped_variables": ["m", "n", "colour", "AnswerNum"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A box contains $m$ white balls and $n$ black balls. A ball is drawn out of the box at random. What is the probability that the ball is black/white?

"}, "extensions": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

A box contains $\\var{m} $ white balls and $\\var{n} $ black balls. A ball is drawn out of the box at random. 

", "variables": {"n": {"group": "Ungrouped variables", "definition": "random(3..13)", "name": "n", "templateType": "anything", "description": "

The number of black balls in the box.

"}, "AnswerNum": {"group": "Ungrouped variables", "definition": "if(colour = 'white',m,n)", "name": "AnswerNum", "templateType": "anything", "description": ""}, "m": {"group": "Ungrouped variables", "definition": "random(3..7)", "name": "m", "templateType": "anything", "description": "

The number of white balls in the box.

"}, "colour": {"group": "Ungrouped variables", "definition": "random('black', 'white')", "name": "colour", "templateType": "anything", "description": "

The colour asked for in the question.

"}}, "preamble": {"css": "", "js": ""}, "parts": [{"unitTests": [], "showCorrectAnswer": true, "marks": 0, "extendBaseMarkingAlgorithm": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "prompt": "

What is the probability that the ball is $\\var{colour}$?

\n

Give your answer as a fraction. For example: 3/5

\n

[[0]]

", "type": "gapfill", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "gaps": [{"unitTests": [], "showCorrectAnswer": true, "maxValue": "{answernum}/({m}+{n})", "correctAnswerFraction": true, "marks": "3", "mustBeReducedPC": 0, "allowFractions": true, "extendBaseMarkingAlgorithm": true, "minValue": "{answernum}/({m}+{n})", "mustBeReduced": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "correctAnswerStyle": "plain", "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}], "sortAnswers": false, "variableReplacements": []}], "type": "question", "contributors": [{"name": "Ioannis Lignos", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/757/"}], "resources": []}]}], "contributors": [{"name": "Ioannis Lignos", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/757/"}]}