Answer to Question #265223 in Python for ren

Question #265223

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


1
Expert's answer
2021-11-12T17:28:09-0500
#Getting inputs from the User
feet_1= int(input("Enter the first length in feet: "))


inche_1 = int(input("Enter the first length in inches "))


feet_2 = int(input("Enter the second length in feet: "))


inche_2 = int(input("Enter the second length in inches "))



# Calculations
inches = inche_1 + inche_2
inc_to_ft = inches // 12
rem_from_div = inches % 12
sum_ft = a_ft + b_ft + inc_to_ft


#Printing the final result
print("Feet: {} Inches: {}".format(sum_ft, rem_from_div))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS