RosettaCodeData/Task/Sleeping-Beauty-problem/EasyLang/sleeping-beauty-problem.easy
2024-03-06 22:25:12 -08:00

11 lines
198 B
Text

reps = 1e6
for i to reps
coin = randint 2
wakings += 1
if coin = 1
heads += 1
else
wakings += 1
.
.
print "Chance of waking up with heads: " & heads / wakings * 100 & "%"