Tell us what’s happening:
Hello, I am having an issue with my Probability Calculator when writing the experiment function. For each num_experiments I am making a deep copy of the hat and calling the draw method with num_balls_drawn. This results in an “IndexError: list index out of range”… I am quite confused because the draw method seems to work otherwise…
Any help will be greatly appreciated. Thank you!
Your browser information:
User Agent is:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36.
Challenge: Probability Calculator
Link to the challenge: