Sorry - trying to learn the language…your playing racquetball , you only score when you serve. 60% chance of winning when you serve, 50% chance of winning when you don’t serve
p5 := If[Random[] >= .5, 1, 0]
p6 := If[Random[] >= .6, 1, 0]
p := If[x < x + Evaluate[p6], x += 1, np];
np := If[Evaluate[p5] == 1, p, np];
score = Table[p, 10]
Do[Print[x]; p, 5]
the best I can do so far and it’s not working, I want to see how far it will take to get to 21, I am not sure how Mathematica works as a programming language. Thanks for any help.


