这段代码有什么问题?我试图获得11分。
def operation(a,b):
return a + b
def calculate(a, b, operation):
print("Parameter a=" + str(a) + ", b=" + str(b) + ", operation=" + str(operation))
b = operation(a, b)
return b
calculate(5,6, operation)
答案 0 :(得分:0)
您的代码存在多个问题。但是,如果您只是希望它显示结果,请将代码修改为以下内容:
def operation(a,b):
return a + b
def calculate(a, b):
print("Parameter a=" + str(a) + ", b=" + str(b))
return operation(a, b)
print(calculate(5,6))