You are a contestant on a gameshow and it’s your chance to win a brand new car! You are presented with 4 doors: A
, B
, C
and D
. The car is secretly behind door C
!
Write a program to simulate this game.
If the user types in A
, B
or D
, display:
Sorry, no car behind that one...
If the user types in ‘C’, display:
Ding! Ding! Ding! YOU WON THE CAR!
If the user types anything else, display:
There is no such door!
Remember to use the Python reference sheet to help you with your code! Click on one of the buttons below:
Need some help? Click here to reveal a video walkthrough for this task!
Below is an example of how the program should run:
There are 4 doors...
.-----. .-----. .-----. .-----.
| | | | | | | |
| A | | B | | C | | D |
| | | | | | | |
.-----. .-----. .-----. .-----.
Behind 1 of them is a car... if you choose correctly, you win it!!
Enter your choice (upper case): A
Sorry, no car behind that one...
There are 4 doors...
.-----. .-----. .-----. .-----.
| | | | | | | |
| A | | B | | C | | D |
| | | | | | | |
.-----. .-----. .-----. .-----.
Behind 1 of them is a car... if you choose correctly, you win it!!
Enter your choice (upper case): C
Ding! Ding! Ding! YOU WON THE CAR!
There are 4 doors...
.-----. .-----. .-----. .-----.
| | | | | | | |
| A | | B | | C | | D |
| | | | | | | |
.-----. .-----. .-----. .-----.
Behind 1 of them is a car... if you choose correctly, you win it!!
Enter your choice (upper case): E
There is no such door!