We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10e5d97 commit 57b1fdcCopy full SHA for 57b1fdc
python6/3.md
@@ -9,7 +9,7 @@
9
10
def sum(num1,num2):
11
# 两数之和
12
- if not (isinstance (num1,(int ,float)) or isinstance (num2,(int ,float))):
+ if not (isinstance (num1,(int ,float)) and isinstance (num2,(int ,float))):
13
raise TypeError('参数类型错误')
14
return num1+num2
15
0 commit comments