Discuss / Python / 运行《函数的参数》那一节的示例出错

运行《函数的参数》那一节的示例出错

郭百岭

#1 Created at ... [Delete] [Delete and Lock User]

calc(1, 2, 3)

Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> calc(1, 2, 3) TypeError: calc() takes exactly 1 argument (3 given)

calc(1, 3, 5, 7)

Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> calc(1, 3, 5, 7) TypeError: calc() takes exactly 1 argument (4 given)


  • 1

Reply