我在 python 中收到缩进错误。有人可以帮我度过难关吗
I am getting indentation error in python. could someone please help me get through this
def outlierCleaner(预测,年龄,net_worths):
error=abs(predictions-net_worths)
print type(error)
cleaned_data = []
### your code goes here
return cleaned_data
错误:
文件“outlier_cleaner.py”,第 14 行
打印类型(错误)
^
IndentationError:意外缩进
完整的代码本来可以提供更多帮助,但您在函数中的缩进是错误的。
#declare you function
def outlierCleaner(predictions, ages, net_worths):
# the code below should have a standard ident
error=abs(predictions-net_worths)
print(error)
cleaned_data = []
### your code goes here
return cleaned_data
def outlierCleaner(预测,年龄,net_worths):
error=abs(predictions-net_worths)
print type(error)
cleaned_data = []
### your code goes here
return cleaned_data
错误: 文件“outlier_cleaner.py”,第 14 行 打印类型(错误) ^ IndentationError:意外缩进
完整的代码本来可以提供更多帮助,但您在函数中的缩进是错误的。
#declare you function
def outlierCleaner(predictions, ages, net_worths):
# the code below should have a standard ident
error=abs(predictions-net_worths)
print(error)
cleaned_data = []
### your code goes here
return cleaned_data