Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,19 @@
(de montyHall (Keep)
(let (Prize (rand 1 3) Choice (rand 1 3))
(if Keep # Keeping the first choice?
(= Prize Choice) # Yes: Monty's choice doesn't matter
(<> Prize Choice) ) ) ) # Else: Win if your first choice was wrong
(prinl
"Strategy KEEP -> "
(let Cnt 0
(do 10000 (and (montyHall T) (inc 'Cnt)))
(format Cnt 2) )
" %" )
(prinl
"Strategy SWITCH -> "
(let Cnt 0
(do 10000 (and (montyHall NIL) (inc 'Cnt)))
(format Cnt 2) )
" %" )