+ 1

CHALLENGE: Monty Hall problem simulator

Create a program which will create a simulation of a Monty Hall problem in any programming language. In a nutshell. You randomly pick one of three doors. Behind one of them is a prize. Computer reveals you a one wrong choise (among two other doors, which player didnt chose) and gives you a chance to change a door. In link below is more information about Monty Hall problem. https://en.m.wikipedia.org/wiki/Monty_Hall_problem GOOD LUCK! 😛

9th Aug 2017, 10:26 PM
null
null - avatar
8 Respuestas
+ 5
What should be input and what should be output?
9th Aug 2017, 10:36 PM
J.G.
J.G. - avatar
+ 5
https://code.sololearn.com/cg58RlM6NS24/?ref=app I haven't tested it, so please give your feedback!
9th Aug 2017, 11:04 PM
J.G.
J.G. - avatar
+ 5
y should not = x. Did that happen?
10th Aug 2017, 1:54 AM
J.G.
J.G. - avatar
10th Aug 2017, 7:20 PM
J.G.
J.G. - avatar
+ 2
https://code.sololearn.com/cplB47R4ADwC/?ref=app Since sololearn doesn't allow input while the program is running I just automated it instead. I did it on phone so I tried to type as little as possible. :)
9th Aug 2017, 11:22 PM
Dennis
Dennis - avatar
+ 1
thanks for question! input: door you choose from 1 to 3 and would you like to change it "y"/"n" or "yes"/"no" output: print text which shows whether you chose right or wrong (mandatory). show also what was behind all doors (optional)
9th Aug 2017, 10:52 PM
null
null - avatar
+ 1
J.G. everything looks fine except int 'y' (revealed door) should not match with user input.
9th Aug 2017, 11:19 PM
null
null - avatar