Coding Task: 03.03 In the Burrows

One day, you find 9 mysterious burrows in your backyard! Being a brave, adventurous person you decide to investigate what is inside them….

Your Task

Fill in the ________ (blanks) and complete the code to write the program below:

Ask the user for which burrow to check.

If they typed in 1, then they found a rabbit.

You found a rabbit!

Otherwise if they type in 5, then they found a gopher.

You found a gopher!

Otherwise if they typed in 9, then they found the treasure!

You found the treasure!

If they typed in anything other than 1, 5, or 9, then they found nothing.

Sorry, just an empty burrow!

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 a number between 1 and 9, and display the appropriate output message based on the values above.

Example

Below is an example of how the program should run:

Which burrow would you like to check (1-9): 1
You found a rabbit!
Which burrow would you like to check (1-9): 5
You found a gopher!
Which burrow would you like to check (1-9): 9
You found the treasure!
Which burrow would you like to check (1-9): 7
Sorry, just an empty burrow!
Scroll to Top