Added Homework 04 - Strings

This commit is contained in:
Edward Bigos 2026-11-03 10:54:55 -05:00
commit be356ccb59
24 changed files with 315 additions and 0 deletions

View file

@ -0,0 +1,14 @@
length = 4
width = 3
# The next line is for the column headers
print("length width area")
# The next two lines generate multiple lengths and widths.
for length in range(1, 3):
for width in range(2, 6):
# The next two lines calculate the area then print the values.
# Modify the print statement to line up the columns aligned right.
area = length * width
print(f"{length} {width} {area}")