Scenario:
A family has three pets at home: 'dog'
, 'cat'
, and 'rabbit'
. They just adopted a new pet.
Task:
Write a Python program that:
Creates a list named pets
with the three pet names.
Prints the pets list.
Prints the second pet in the list.
Appends 'parrot'
to the list.
Displays the updated list.
Prints how many pets they now have in total.
We’re always looking for international STEM educators to join our team. If you are interested, please send us a mail and we’ll get back to you!
If you have any questions, kindly send us a mail. Don’t forget to follow and like all our social accounts to get updates on competitions!