乘号 发表于 2020-2-27 15:06:44

python代码报错,求助大佬

def temp_conversion(c):
    f = c * 1.8 + 32
    return f


c = float(input("请输入摄氏度:"))
f = temp_conversion(c)

print("转换成华氏度是: " + str(f)

zltzlt 发表于 2020-2-27 15:39:36

def temp_conversion(c):
    f = c * 1.8 + 32
    return f


c = float(input("请输入摄氏度:"))
f = temp_conversion(c)

print("转换成华氏度是: " + str(f))

最后一行漏了个右括号

王奥运 发表于 2020-2-27 15:53:55

def temp_conversion(c):
    f = c * 1.8 + 32
    return f


c = float(input("请输入摄氏度:"))
f = temp_conversion(c)

print("转换成华氏度是: " + str(f)) 最后漏输括号

乘号 发表于 2020-2-27 18:06:58

zltzlt 发表于 2020-2-27 15:39
def temp_conversion(c):
    f = c * 1.8 + 32
    return f


好的谢谢

乘号 发表于 2020-2-27 18:07:28

王奥运 发表于 2020-2-27 15:53
def temp_conversion(c):
    f = c * 1.8 + 32
    return f


好的谢谢
页: [1]
查看完整版本: python代码报错,求助大佬