Difference between revisions of "Quiz 1 Senno"
Ahmadsennop (talk | contribs) |
Ahmadsennop (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 30: | Line 30: | ||
print ('maka y(0.03) adalah', y) | print ('maka y(0.03) adalah', y) | ||
+ | |||
+ | |||
+ | [[ File:Quiz 1 nomor 2.PNG ]] | ||
+ | |||
+ | |||
+ | dan hasilnya | ||
+ | |||
+ | |||
+ | [[ File:Run Quiz 1 nomor 2.PNG ]] |
Latest revision as of 13:51, 20 October 2019
Problem set 2.1 no 6
Hasil
Problem set 7.1 no. 1
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: k1 = diff_y (x,y) k2 = diff_y ((x+0.5*h), (y+0.5*k1*h))
y = y + k1*h
print ('maka y(0.03) adalah', y)
dan hasilnya