2024-04-24 05:05:36 发布
网友
这个代码怎么了?结果我想得到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)
您的代码有多个问题。但是,如果您只希望它显示结果,请将代码修改为以下内容:
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))
您的代码有多个问题。但是,如果您只希望它显示结果,请将代码修改为以下内容:
相关问题 更多 >
编程相关推荐