函数输出
本帖最后由 tomer 于 2014-11-04 09:51 编辑defdo_plus(x,y):
if type(x)==type(1) and type(y)==type(1):
return x+y
else:
return None
print("please input two number:")
a=input()
b=input()
number=do_plus(a,b)
if(number!=None):
print(number)
else:
print("input ERROR")
为什么输入2和3,不输出5呢
#python file
please input two number:
2
3
input ERROR
昨天还能正确输出呢,今天就不行了。。
页:
[1]