Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Election Poll Simulation - Getting a Sample of size 10
def get_sample_from_distribution(n):
Creates an array of size n.
Each value will be 1 if some person would vote on Alice and
0 if he would vote on Bob.
sample_opinions = []
for i in range(n):
return sample_opinions
example = get_sample_from_distribution(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.