Completed Exercise 6-8 Pets

This commit is contained in:
cheeks 2025-01-31 08:10:09 -05:00
parent 19323db65a
commit 027b7fd4d5

17
Chapter_06/6-08_pets.py Normal file
View File

@ -0,0 +1,17 @@
# Exercise 6-8 Pets
# Learning Objective: Nest dictionaries in a list.
#pets
killer = {'name': 'killer', 'kind_of_animal': 'hamster', 'size': 'small', 'owner_name': 'jillian'}
spud = {'name': 'soud', 'kind_of_animal': 'turtle', 'size': 'small', 'owner_name': 'robert'}
tex = {'name': 'tex', 'kind_of_animal': 'lizard', 'size': 'medium', 'owner_name': 'josh'}
bartholomeow = {'name': 'bartholomeow', 'kind_of_animal': 'cat', 'size': 'large', 'owner_name': 'michelle'}
goldie = {'name': 'goldie', 'kind_of_animal': 'dog', 'size': 'medium', 'owner_name': 'george'}
pets = [killer, spud, tex, bartholomeow, goldie]
for pet in pets:
print(pet)