Question 7: Variables

Write a Python program to display fun details about the cartoon characters Tom and Jerry.

  1. Create a variable called tom and assign it the type of animal Tom is (e.g., "cat").
  2. Create a variable called jerry and assign it the type of animal Jerry is (e.g., "mouse").
  3. Create a variable called favorite_activity and assign it the activity they are always doing (e.g., "chasing each other").
  4. Create a variable called fun_fact and assign it a fun fact about the cartoon (e.g., "Tom and Jerry cartoons have been entertaining kids since 1940!").
  5. Use the print function to display the following:
    • The animals: "Tom is a [tom] and Jerry is a [jerry]."
    • Their activity: "They are always [favorite_activity]."
    • A fun fact: "Did you know? [fun_fact]"

 

Write what you are looking for, and press enter to begin your search!