First page Back Continue Last page Overview Graphics

Exercise

Write a generator which returns a stream of zeroes and ones:

1 with a probability of p and

0 with a probability of (1 - p)