SHARE
TWEET

Untitled

a guest Nov 14th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2. random.seed(42)
  3. sim=10000
  4. win=0
  5. for i in range(sim):
  6.     x1=random.randint(1,8)
  7.     y1=random.randint(1,8)
  8.     x2 = random.randint(1, 8)
  9.     y2 = random.randint(1, 8)
  10.     x3=random.randint(1,8)
  11.     y3=random.randint(1,8)
  12.     if x1!=x2 and x1!=x3 and x2!=x3 and y1!=y2 and y1!=y3 and y2!=y3:
  13.         win+=1
  14. print(win/sim)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top