Question 4: Variables

Write a Python program to display information about a child’s favorite animal.

  1. Create a variable called animal_name and assign it the name of the animal (e.g., "elephant").
  2. Create a variable called animal_sound and assign it the sound the animal makes (e.g., "trumpet").
  3. Create a variable called animal_habitat and assign it the place where the animal lives (e.g., "forest").
  4. Create a variable called animal_fact and assign it a fun fact about the animal (e.g., "Elephants have very strong trunks.").
  5. Use the print function to display the following:
    • The animal’s name and sound: "My favorite animal is the [animal_name], and it makes a [animal_sound] sound."
    • Where the animal lives: "It lives in the [animal_habitat]."
    • A fun fact: "Did you know? [animal_fact]"
Write what you are looking for, and press enter to begin your search!