Question: I need to create a program similar to the Monty Hall game 'Lets make a Deal' in Python using random number generator. what i don't

I need to create a program similar to the Monty Hall game 'Lets make a Deal' in Python using random number generator. what i don't understand is the following part of the assignment: ' The seed command can be used to control the sequence of random numbers generated. This will fix the sequence of execution for your program. The following code will always print the same output.

import random

random . s e e d ( 1 0 )

p r i n t ( random . r a n di n t ( 0 , 1 0 ) )

The below code will be random.

import random

random . s e e d ( )

p r i n t ( random . r a n di n t ( 0 , 1 0 ) )

We recommend you use a seed when developing your code, when switch to random values once you have tested it. You should only call seed once for your entire program.'

We are supposed to create a list with the car behind door 1 then shuffle a list of doors to randomize the car location. We then have the player pick a door from 1-3 and then monty picks a door with a goat then determine whether the player should switch or not. Please do not give me the full code but explain how I can go about doing this because at the moment I am at a loss.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!