Monty Hall problem: Difference between revisions

Content added Content deleted
(→‎{{header|Python3}}: Small tidy: Make a sub-section of Python. Remove name as page history has author info.)
Line 2,480: Line 2,480:




===Python: Alternative version===
=={{header|Python3}}==
Another (simpler?), way to do this is below, also in python 3:
<lang python>
<lang python>import random

#Another simpler(my opinion) way to do this is below, also in python 3:

import random
#1 represents a car
#1 represents a car
#0 represent a goat
#0 represent a goat
Line 2,516: Line 2,513:


print("Stay =",stay)
print("Stay =",stay)
print("Switch = ",switch)
print("Switch = ",switch)</lang>

# Done by Sam Witton 09/04/2014
</lang>


=={{header|R}}==
=={{header|R}}==