All pastes #839155 Raw Edit

Unnamed

public text v1 · immutable
#839155 ·published 2007-12-30 21:36 UTC
rendered paste body
import random

def lifeisgay():
	a = random.randint(1,4)
	if a == 1:
		return 1
	else:
		return 0
happens = 0
nohappens = 0
i = 4
count = 0
while 1:
	while i != 4:
		if lifeisgay() == 1:
			happens = happens + 1
		else:
			nohappens = nohappens + 1
		i = i+1
	try:
		print happens/nohappens
	except ZeroDivisionError:
		print '0 division ftw'
	count = count + 1
	print 'Count: ', count