Anonymous
Anonymous asked in Computers & InternetProgramming & Design · 2 months ago

# programming python help ?

programming python help ?

Willie the welder has asked you to write a program. Willies job is to take twop pipes and weld them into one. Each pipe has a specific length, measured in feet and inches. Your job is to add the two lengths of pipe and print the combinedlength of the pipe. Final answer should not show more than 11 inches

How would I go about writing this in python

so I started off by writing my variables

pipe 1 = ft + in

pipe 2 = ft + in

length = pipe 1 + pipe 2

total inches = length in inches pipe 1 + length in inches pipe 2

total feet = length in feed pipe 1 + lenth in feed pipe 2

I am pretty sure i am on the wrong track, and I would really appreciate any help.

Relevance
• Anonymous
2 months ago

The goal is to display the length in feet' inches" notation, so 1 pipe measuring 5'6" + 3'8" = 9'2"

Best way would be to do all the math in inches first, then convert the inches into feet (divide by 12) the remainder is the amount of inches