Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- from sys import maxsize
- def right_timi():
- counter = 0
- overflow = False;
- while True:
- if counter == maxsize:
- overflow = True
- else:
- overflow = False;
- if move():
- counter = counter - 1
- else:
- counter = counter + 1
- if overflow:
- print 'OVERFLOW'
- return
- if counter == -1:
- return
- def right_mike():
- if move():
- return
- else:
- right_mike()
- right_mike()
- def move():
- x = random.uniform(0, 1)
- return x >= 0.9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement