Ask Question
31 August, 11:44

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

+4
Answers (1)
  1. 31 August, 13:15
    0
    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))
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “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 ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers