Here, we will be simulating the occurrence coin face i.e. H - HEAD, T - TAIL. Simply we are going to use an inbuilt library called as random to call a random value from given set and thereby we can stimulate the occurrence value by storing the occurrence in the list ls of length 2 representing each face of the coin as ls[] represents the occurrence of:
Here, we will be stimulating the occurrence of each dice face i.e. 1, 2, 3, 4, 4, 4, 5, 6, 6, 6, 6. Simply we are going to use an inbuilt library called as random to call a random value from given set and thereby we can stimulate the occurrence value by storing the occurrence in the list ls of length 6 representing each face of the dice as ls[4] represents the occurrence of face 5.
ls[0] - coin(H)
ls[1] - coin(T)
Then using the library pylab, we can plot the value of each occurrence and can stimulate it.
Program:
Output
need an explanation for this answer? contact us directly to get an explanation for this answer