Computer Science, asked by jnelson22, 1 year ago

Write a program that inputs the length of two pieces of fabric in feet and inches (as whole numbers) and prints the total.

Enter the Feet for the first piece of fabric: 3
Enter the Inches for the first piece of fabric: 11

Enter the Feet for the second piece of fabric: 2
Enter the Inches for the second piece of fabric: 5
It displays:

Feet: 6 Inches: 4

Answers

Answered by debangshu90hazra
20

Answer:

feetFab1 = int(input("Enter the feet for the first piece of fabric: "))

inchFab1 = int(input("Enter the inches for the first piece of fabric: "))

feetFab2 = int(input("Enter the feet for the second piece of fabric: "))

inchFab2 = int(input("Enter the inches for the second piece of fabric: "))

feetSum = (feetFab1 + feetFab2)

inchSum = (inchFab1 + inchFab2)

totalFeet = ((inchSum % 12) + feetSum)

totalInch = (feetSum % 12)

print ("Feet: " + str(totalFeet) + ". Inches: " + str(totalInch))

MARK AS BRAINLIEST... :) YOU WILL GET HALF OF YOUR POINTS BACK.. :)

Similar questions