def g(x): return -0.04**3+7.2*x**2-240*x+3000 def temp(): x=20 y=g(x) while y<...: x=x+1 y=... return x