from random import randintfrom sys import maxsizedef ran(f): a = randint(-maxsize,maxsize) b = randint(-maxsize,maxsize) if f(a)*f(b)<0: return (a,b)else: def f1(x): return xran(f)为什么这段代码有时候会打印None?补充:最后是print(ran(f))打错了
添加回答
举报
0/150
提交
取消