It's much too fun not to try it ourselves: http://jsfiddle.net/simonsarris/as2Zu/
So far I've "only" gotten 16 heads in a row after a few thousand flips
So far I've "only" gotten 16 heads in a row after a few thousand flips
best = 0
i = 0
while true
i += 1
count = 0
face = 1
while face == 1
face = rand(0:1)
count += face
end
if count > best
best = count
println("new record: $best in iteration $i")
end
end