题解 | #函数求差#
函数求差
http://www.nowcoder.com/practice/ad1a6e344add40bdb05c44ce086c1e94
NP32 函数求差
思路:
定义函数,然后传参调用即可;
代码如下:
def cal(x,y):
return x-y
x = input()
y = input()
print(cal(x,y))
print(cal(y,x))
函数求差
http://www.nowcoder.com/practice/ad1a6e344add40bdb05c44ce086c1e94
def cal(x,y):
return x-y
x = input()
y = input()
print(cal(x,y))
print(cal(y,x))
相关推荐