Skip to content

Instantly share code, notes, and snippets.

@telliott99
Created May 7, 2021 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save telliott99/a5bb35bd526afb925492f7ba5a5d1322 to your computer and use it in GitHub Desktop.
Save telliott99/a5bb35bd526afb925492f7ba5a5d1322 to your computer and use it in GitHub Desktop.
from matplotlib import pyplot as plt
import sys, random
k = int(sys.argv[1])
N = 100000
L = list()
for i in range(N):
v = 0
for j in range(k):
v += random.random()
L.append(v)
plt.hist(L,100)
plt.savefig('example' + str(k) + '.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment