Python中 1. 编写函数,要求输入x与y,返回x和y的平方差 2. 计算1到100的平方的和

3. 编写函数,若输入为小于100的数,返回TRUE,大于100的数,返回FALSE

1、

def pfc(x,y):
    return x**2-y**2

2、

sum(map(lambda x:x**2,range(101)))

3、

def comp100(n):
    return True if n<100 else False

温馨提示:答案为网友推荐,仅供参考
相似回答