阅读背景:

TypeError: Can't convert 'float' object to str implicitly or TypeError: unsupported operand type(s)

来源:互联网 

错误代码

T_option = input("Celsius, fahrenheit, or Kelvin? ").lower()
if T_option == "celsius" or T_option == "c":
    T_C = input("Input temperature: ")
    T = (T_C - 273.15)
    print("Temp set to " + str(T) + "K")

elif T_option == "kelvin" or T_option == "k":
    T = input("Input temperature: ")
    print("Temp set to " + str(T) + "K")

elif T_option == "fahrenheit" or T_option == "f":
    T_F = input("Input temperature: ")
    T = ((T_F + 459.67) * 5/9)
    ("Temp set to  " + str(T) + "K")T_option = input("Celsius, fahren



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: