Ask 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 prints the total

+4
Answers (1)
  1. 19 July, 03:35
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers