Completed 4-14 PEP 8 & 4-15 Code Review, modified 4-1, 4-2, & 4-3

This commit is contained in:
cheeks 2025-01-21 15:47:18 -05:00
parent 57900c59da
commit a0deee49bf
5 changed files with 17 additions and 7 deletions

3
Chapter_04/4-14_pep8.py Normal file
View File

@ -0,0 +1,3 @@
# Exercise 4-14 PEP 8
# Learning Objective: Get familiar with https://python.org/dv/peps/pep-0008
# No coding necessary for this exercise

View File

@ -0,0 +1,11 @@
# Exercise 4-15 Code Review
# Learning Objective: Modify 3 programs to comply with PEP 8.
'''
Modified Programs:
4-1
4-2
4-3
'''

View File

@ -2,15 +2,11 @@
# 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!")