2025-01-22 12:32:29 -05:00

12 lines
308 B
Python

# Exercise 4-2 Animals
# Learning Objective: Same as 4-1, utilize for loop.
animals = ['dog', 'cat', 'ferret']
'''
for animal in animals:
print(animal)
'''
#modified:
for animal in animals:
print(f"A {animal} would make a great pet. \n")
print("These animals all have 4 legs and make great pets!")