In [1]: # Setting up the default packages: numpy, matplotlib, and datascience
# Please make sure those packages are installed using pip
from datascience import *
import numpy as np
import matplotlib
matplotlib.use('Agg')
%matplotlib inline
import matplotlib.pyplot as plots
plots.style.use('fivethirtyeight')
import warnings
warnings.simplefilter(action="ignore", category=FutureWarning)
# Random Game
# My friend and I play the following game repeatedly:
# A fair die is rolled. If it shows one or six spots, I give my friend 1 point.
# If it shows two or five spots, my friend gives me 1 point.
# If it shows three or four spots, neither of us gets any point.
In [2]: # Implement the python code here to output the histogram