# fabric_length.py
# Calculate the total length of two fabrics
print("Enter the length of the first fabric")
feet1 = int(input("Feet: "))
inches1 = int(input("Inches: "))
print("\nEnter the length of the second fabric")
feet2 = int(input("Feet: "))
inches2 = int(input("Inches: "))
inches = inches1 + inches2
feet = feet1 + feet2 + inches // 12
inches %= 12
print(f"The total length is {feet} feet and {inches} inch(es)")
Comments
Leave a comment