Commit 90fbfa7f authored by pattaraporn's avatar pattaraporn

aa

parent 39c02e8e
def f(x): return x**2-2*x+1
def bracket7(f,a=-2,b=2,h=0.01):
xi=a
oldf=f(xi)
xi+=h
newf=f(xi)
while newf<oldf
newf=oldf
x+=h
newf=f(xi)
xi=h
print(xi)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment