Question: Question 2 Consider two boxes. Box A contains 7 blue and 5 red marbles, while box B contains 6 blue and 8 red marbles. A
Question
Consider two boxes. Box A contains blue and red marbles, while box contains blue and
red marbles. A box is selected at random, and marbles are drawn from it at random.
Let number of blue balls in the sample of marbles.
Part a
Create a python function prob with only one input variable and which for any
kin computes the value of Do NOT round the output values
PYTHON CODE MUST PASS ALL TEST BELOW
Check whether function prob is defined and has input parameter k
assert callableprob "Sorry, you didn't define function prob
assert prob& "Sorry, prob is a probability, which means a number from
"Check whether all the probabilities sum up to
assert abssumnparrayprobk for in rangee "Sorry, sum of all probk k MUST b
NOTE: The quotation above finished off to say, "Sorry, sum of all prob MUST be
"Check whether the th decimal digit of probk is
assert "Sorry, wrong answer"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
