Skip to content

Instantly share code, notes, and snippets.

View sgodfrey66's full-sized avatar

Stephen Godfrey sgodfrey66

View GitHub Profile
# Import libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
# Pick a seed for the random number generator
np.random.seed(101)
# Simulate game
n_sims = 10_000
game_record = []
for i in range(n_sims):
# Simulate two dice rolls
rolls = np.random.randint(1,7,2)
# Sum the two dice
sum = rolls.sum()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.