def h(x): y=x**3-2**x**2+5 return y def Balayage(p): a=-3 while h(a)>=0: a=a+p return a-p,a