Page 1 of 1
Simple Simulation of ESPN Streak for the Cash
Posted: Fri Apr 10, 2009 5:18 pm
by michaeled314
my dad said my standings,
http://streak.espn.go.com/entryStreaks? ... egmentID=2 , were not better than a coin flip so I had to prove it to him
http://streak.espn.go.com/
Posted: Fri Apr 10, 2009 5:27 pm
by michaeled314
Code: Select all
wstreak.l
wmaxstreak.l = 0
lstreak.l
lmaxstreak.l = 0
coinflip.l
correct.l = 0
wrong.l = 0
standings.d = 0
For i = 1 To 32
coinflip = Random(1)
If coinflip
wstreak+1
correct+1
lstreak = 0
Else
wstreak = 0
wrong+1
lstreak+1
EndIf
If wstreak > wmaxstreak
wmaxstreak = wstreak
EndIf
If lstreak > lmaxstreak
lmaxstreak = lstreak
EndIf
Next
standings = correct/(correct+wrong)
Debug "Wins: "+Str(correct)
Debug "Losses: "+Str(wrong)
Debug "Longest Winning Streak: "+Str(wmaxstreak)
Debug "Longest Losing Streak: "+Str(lmaxstreak)
Debug "Percentage: "+Str(standings*100)