I’m trying to print odds for 40% against 60%. I found that math.random() function doesn’t do decimal numbers, anyone know a way around this?
Please see my code and my comment on the math.random.
while (nFlip <= 99) do
randomFlip = math.random (0,2.5) – Trying to get 40% by doing 0-2.5
nFlip = nFlip + b
print( randomFlip )
if randomFlip == 2.5 then
countHeads = countHeads + b
end