a) Make a program that simulates flipping a coin \( N \) times.
Hint. Use r = random.random() and define head as r <= 0.5.
r = random.random()
r <= 0.5
b) Compute the probability of getting heads.
Answer. 0.5.
Filenames: flip_coin.py, flip_coin.pdf.
flip_coin.py
flip_coin.pdf