Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: latin-1 -*-
- import os, sys, random, time
- N = 10**6
- ti = time.time()
- dado = [0]*7
- for i in range(N) :
- dado[random.randrange(1,7)]+=1
- tf = time.time()
- dif = (tf-ti)
- for i in range(1,7) :
- print(i, "está repetido", dado[i], "veces")
- print(N, "numeros pseudoaleatorios en",dif,"segundos")
- time.sleep(60)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement