Last active
March 3, 2018 13:22
-
-
Save KonradIT/ae0fef6fc57b58508df23ccc103c6d3e to your computer and use it in GitHub Desktop.
had to do it to em
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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