【发布时间】:2020-07-31 14:03:59
【问题描述】:
这是我的代码:
def c_to_f(c):
f = c*(9/5) + 32
return f
c = input("Please enter the temperature in celsius: ")
if c< -273.15:
return "That temperature is not achievable."
else:
return f
print("Here's your temperature in Fahrenheit: ", c_to_f(c))
终端,在执行此代码时显示:
if c< -273.15:
^
IndentationError: unexpected indent
我该如何解决这个错误?
【问题讨论】:
-
这意味着你的
if c< -273.15:循环在不应该缩进的时候被缩进了
标签: python indentation