Python, Random Numbers, Monte Carlo Simulation, Data Science, Probability.
The probability(H) = 0.2 and probability(T) = 0.8. H_count = 0 for i in range(0,10000): new_flip = random.choices(['H', 'T'], weights=[0.2, 0.8]) if new_flip == ['H']: # notice that this function returns a list H_count = H_count + 1 print (H_count) # output is 1973 which is close to 2000 Law of