Jump to content

Monty Hall problem: Difference between revisions

→‎{{header|Python3}}: Small tidy: Make a sub-section of Python. Remove name as page history has author info.
(→‎{{header|Python3}}: Small tidy: Make a sub-section of Python. Remove name as page history has author info.)
Line 2,480:
 
 
===Python: Alternative version===
=={{header|Python3}}==
#Another (simpler(my opinion?), way to do this is below, also in python 3:
<lang python>import random
 
#Another simpler(my opinion) way to do this is below, also in python 3:
 
import random
#1 represents a car
#0 represent a goat
Line 2,516 ⟶ 2,513:
 
print("Stay =",stay)
print("Switch = ",switch)</lang>
 
# Done by Sam Witton 09/04/2014
</lang>
 
=={{header|R}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.