Oct-16-2020, 04:13 PM
I was given an assignment to traslate a program from javascript to Python (I don't know Javascript) and then to add in 2 while statements. I haven't made it very far into it yet, but each time I try to fix this program I keep getting the same error on line 9: "Line 9: TypeError: 'float' object is not callable" and I'm not sure how to fix it. I'm a beginner. Can anyone help me fix my error?


print("Tempture Conversion") print("___________________") f = float(input("Enter tempature in Farenhieght")) con = float(input("Enter the desired tempature translation: ")) #this is a list of the options print(" \n 1) Celcius \n 2) Kelvin \n 3) Rankine \n 4) Delisle \n 5) Newton \n 6) Reamur \n 7) Romer ") #I was trying to do the math for the problems here c = int((5/9)(f - 32)) k = int((f - 32) (5/9) + 273.15) ra = int(k * 1.8) de = int((212-f)*5/6) N = int((f - 32)* 0.18333) re = int((f - 32) / 2.25) ro = int((f -32)*7/24+7.5) #The while statement is supposed to repeat until the user types in "Stop" asking the same question in a loop cycle. while( con != "Stop"): if(con == 1): print(" Tempature in Celcius: " + str(c)) con = float(input("Enter the desired tempature translation:(Stop to stop) "))