24 lines
693 B
Python
24 lines
693 B
Python
class View:
|
|
def __init__( self ):
|
|
print( "Welcome to the Monty Hall Problem!")
|
|
|
|
def get_name( self ):
|
|
return input( "Please enter your name: " )
|
|
|
|
def display_doors( self ):
|
|
print( 'Doors: [ 1 ] [ 2 ] [ 3 ]' )
|
|
return input( 'Select door: ' )
|
|
|
|
def host_twist( self, message ):
|
|
print( "The host will revel where one goat is..." )
|
|
print( message )
|
|
print( "Would you like to change your selection? [n/y]" )
|
|
return input( "[no]: ")
|
|
|
|
def winner( self ):
|
|
print( "You WIN!!!" )
|
|
return input("Play again?[y]")
|
|
|
|
def loser( self ):
|
|
print( "You Lose!!!" )
|
|
return input("Play again?[y]") |