Question: #You do not need to write a complete program, all you need is to complete this code using (python/probability). Calculate the probability of rolling a
#You do not need to write a complete program, all you need is to complete this code using (python/probability).

Calculate the probability of rolling a sum equal to 30 if you roll 10 dice Note: You should not generate a huge container for the sample space as you did before, you should write a simulation. Answer: (penalty regime: 0 %) Reset answer i import random as rnd 2 3. def drawSample(): 4 # return true if sample belongs to event space, false otherwise 5 # this must be implemented by you 6 return True 7 8 numRuns = # decided by you 9 numHits = 0 10 for i in range(numRuns): 11 12 # generate random sample from sample space 13 # this must be generated by if(drawSample()): 15 numHits += 1 16 17 myAnswer = 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
