Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. from random import randint
  2.  
  3. correctCount = 0
  4. maxNum = 1000000
  5. for i in range(maxNum):
  6. correct = randint(0,2)
  7. choice = randint(0,2)
  8.  
  9. if(correct != choice):
  10. correctCount+=1
  11.  
  12. print(correctCount/maxNum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement