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

this is what my code looks like right now. can you anyone please spot where am I making the mistake. 

from tkinter import*

def pipe(feetpipe1,Inchespipe1, feetpipe2, Inchespipe2):

    feetinpipe1 = feetpipe1 * (12)

    feetinpipe2 = feetpipe2 * (12)

    Inchespipe1 = Inchespipe1

    Inchespipe2 = Inchespipe2

    total = feetinpipe1 + feetinpipe2 +Inchespipe1 + Inchespipe2

    return total

feetpipe1 = eval(input("feetpipe 1:"))

Inchespipe1 = eval(input("inches pipe 1:"))

feetpipe2 = eval(input("feetpipe 2:"))

Inchespipe2 = eval(input("inches pipe 2:"))

total = pipe(feetpipe1,Inchespipe1, feetpipe2, Inchespipe2)

print ("the total length is", (total))

if total > 11

    print("the toal is")

else:

1 Answer

Relevance
  • EddieJ
    Lv 7
    1 month ago

    You need a colon at the end of

    if total > 11:

    The code you showed is incomplete.

    I don't know why you are importing tkinter

Still have questions? Get your answers by asking now.