fork download
  1. number = 0. total= 10**5
  2.  
  3. for j in range(1,total+1): cell = [0,0,0,0] for i in range(12): cell[random.randint(0, 3)] += 1
  4.  
  5. if cell[0] > 0 and cell[1] > 0 and cell[2] > 0 and cell[3] > 0:
  6. number += 1.
  7. #print cell
  8. print 'P: ', number/j
  9.  
Runtime error #stdin #stdout 0.01s 4672KB
stdin
Standard input is empty
stdout
Standard output is empty