Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- n=0
- N=100000
- b=0
- for i in range(N):
- a=[["Решка","Орел"]]*99 + [["Орел","Орел"]]
- b=random.choice(a)
- c=random.choice(b)
- if c== "Орел":
- N+=1
- b.remove(c)
- if b[0]=="Орел":
- n+=1
- print(n/N)
Advertisement
Add Comment
Please, Sign In to add comment