diff --git a/Chapter_04/4-2_animals.py b/Chapter_04/4-2_animals.py new file mode 100644 index 0000000..e68edec --- /dev/null +++ b/Chapter_04/4-2_animals.py @@ -0,0 +1,16 @@ +# 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!") \ No newline at end of file