Difference between revisions of "User talk:Yarynara Sebrio Suharyadi"

From ccitonlinewiki
Jump to: navigation, search
(Biografi)
(Python)
Line 19: Line 19:
  
 
x1 = 0
 
x1 = 0
 +
 
dx1 = ('0.1')
 
dx1 = ('0.1')
 +
 
dx = float (dx1)
 
dx = float (dx1)
 +
 
x2 = x1+dx
 
x2 = x1+dx
 +
 
Fx_1 = ((x2**2)-1) / (x1-1)
 
Fx_1 = ((x2**2)-1) / (x1-1)
 +
 
n = 1
 
n = 1
 +
 
error = 0
 
error = 0
 +
 
print ("n  x  F(x)  error")
 
print ("n  x  F(x)  error")
 +
 
print (n," ",x1," ",Fx_1," ",error)
 
print (n," ",x1," ",Fx_1," ",error)
 +
 
while x2<1 :
 
while x2<1 :
 +
 
Fx_2 = ((x2**2)-1) / (x2-1)
 
Fx_2 = ((x2**2)-1) / (x2-1)
 +
 
error = ((Fx_2-Fx_1) / Fx_1)
 
error = ((Fx_2-Fx_1) / Fx_1)
 +
 
Fx_1 = Fx_2
 
Fx_1 = Fx_2
 +
 
n = n+1
 
n = n+1
 +
 
print (n," ",x1," ",Fx_1," ",error)
 
print (n," ",x1," ",Fx_1," ",error)
 +
 
x2=x2+dx
 
x2=x2+dx

Revision as of 13:33, 16 September 2019

Yarynara Sebrio Suharyadi

Nama : Yarynara Sebrio Suharyadi

Jurusan : Teknik Mesin Paralel Universitas Indonesia

NPM  : 1706070816

Biografi

TTL  : Jakarta, 23 September 1999

Hobi : Bermain Tenis


Python

contoh pengerjaan python

x1 = 0

dx1 = ('0.1')

dx = float (dx1)

x2 = x1+dx

Fx_1 = ((x2**2)-1) / (x1-1)

n = 1

error = 0

print ("n x F(x) error")

print (n," ",x1," ",Fx_1," ",error)

while x2<1 :

Fx_2 = ((x2**2)-1) / (x2-1)

error = ((Fx_2-Fx_1) / Fx_1)

Fx_1 = Fx_2

n = n+1

print (n," ",x1," ",Fx_1," ",error)

x2=x2+dx