2.3 Code Practice: Question 2
Write a program that inputs the length of two pieces of fabric in feet and inches (as whole numbers) and prints the total

Respuesta :

Answer:

feetFab1 = int(input(""Enter the value in feet for the 1st  piece of fabric: ""))

inchFab1 = int(input(""Enter the value in inches for the 1st  piece of fabric: ""))

feetFab2 = int(input(""Enter the value in feet for the 2nd  piece of fabric: ""))

inchFab2 = int(input(""Enter the value in inches for the 2nd  piece of fabric: ""))

feetSum = (feetFab1 + feetFab2)

inchSum = (inchFab1 + inchFab2)

totalFeet = ((inchSum % 12) + feetSum)

totalInch = (feetSum % 12)

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

ACCESS MORE