Question 21: List Pets

Pet Name List

Scenario:
A family has three pets at home: 'dog', 'cat', and 'rabbit'. They just adopted a new pet.

Task:
Write a Python program that:

  1. Creates a list named pets with the three pet names.

  2. Prints the pets list.

  3. Prints the second pet in the list.

  4. Appends 'parrot' to the list.

  5. Displays the updated list.

  6. Prints how many pets they now have in total.

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