Difference between revisions of "Quiz 1"

From ccitonlinewiki
Jump to: navigation, search
Line 11: Line 11:
  
 
[[File:Hasil 2.jpg]]
 
[[File:Hasil 2.jpg]]
 +
coding nomor 2
 +
 +
import numpy as np
 +
 +
def diff_y (x,Y):
 +
    fungsi = x**2 - 4*y
 +
    return (fungsi)
 +
x=0
 +
y=1
 +
h=0.01
 +
step_size -np.arange (0,0.03,h)
 +
 +
for t in step_size:
 +
    kl-diff_y (x,y)
 +
    k2- diff_y ((x+0.5*h), (y+0.5*kl*h))
 +
    y-y+kl*h
 +
print ('maka y(0.03) sama dengan', y)

Revision as of 15:17, 14 October 2019

Nomor 1

Coding.jpg

Hasil.jpg


nomor 2

Coding2.jpg

Error creating thumbnail: File with dimensions greater than 12.5 MP

coding nomor 2

import numpy as np

def diff_y (x,Y):

   fungsi = x**2 - 4*y
   return (fungsi)

x=0 y=1 h=0.01 step_size -np.arange (0,0.03,h)

for t in step_size:

   kl-diff_y (x,y)
   k2- diff_y ((x+0.5*h), (y+0.5*kl*h))
   y-y+kl*h

print ('maka y(0.03) sama dengan', y)