Source Code ANNUM - 177011033 - Lucky Andiza Harris
Source Code ANNUM - 177011033 - Lucky Andiza Harris
def f(x):
def secant(x0,x1,e,N):
step = 1
condition = True
while condition:
if f(x0) == f(x1):
break
x0 = x1
x1 = x2
step = step + 1
if step > N:
print('Not Convergent!')
break
# Input Section
x0 = 1
x1 = 2
e = 0.01
N = 10
x0 = float(x0)
x1 = float(x1)
e = float(e)
# Converting N to integer
N = int(N)
secant(x0,x1,e,N)