I’m down to my past project (Probability calculator). I couldn’t get pass the 2nd test, could you please help. I attached screenshot of Chrome console and it indicated some Assertion Errors. Could you please explain to me what those errors are ?
import copy
import random
class Hat:
def __init__(self, **kwargs):
self.contents = []
for color, num in kwargs.items():
for i in range (0,num):
self.contents.append(color)
def draw(self, num):
if num >= len(self.contents):
return self.contents
else:
for i in range(0,num):
self.contents.pop(random.randrange(len(self.contents)))
return self.contents
def experiment(hat, expected_balls, num_balls_drawn, num_experiments):
pass