Skip to content

Instantly share code, notes, and snippets.

@KonradIT
Last active March 3, 2018 13:22
Show Gist options
  • Save KonradIT/ae0fef6fc57b58508df23ccc103c6d3e to your computer and use it in GitHub Desktop.
Save KonradIT/ae0fef6fc57b58508df23ccc103c6d3e to your computer and use it in GitHub Desktop.
had to do it to em
import random
import argparse
_argp = argparse.ArgumentParser()
_argp.add_argument("-n", "--number", help = "1...{n}")
_argp.add_argument("-t", "--loop", help = "Loop n")
args = vars(_argp.parse_args())
_max = args["number"]
_loop = args["loop"]
num={i+1:0 for i in range(0,int(_max))}
for _ in range(int(_loop)):
r = random.randint(1,int(_max))
num[r] += 1
print(num)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment