Coding Task: 03.01 Win a Car

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!

Your Task

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!

Python Reference Sheet

Remember to use the Python reference sheet to help you with your code! Click on one of the buttons below:

Requirements

  • The program should run without any errors.
  • The program should ask the user to enter their choice of door, and display the appropriate output message based on the values above.

Example

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!
Scroll to Top