49%
12.11.2020
):
return x*x
# end def
def trapezoidal(a, b, n, h):
s = 0.0
s += h * f(a)
for i in range(1, n):
s += 2.0 * h * f(a + i*h)
# end for
s += h * f(b)
return (s/2.)
# end def
# Main
49%
17.05.2017
, 5 ) / ( 8, 5 ) }
DATA {
(0,0): 0, 1, 2, 3, 4,
(1,0): 5, 6, 7, 8, 9,
(2,0): 10, 11, 12, 13, 14,
(3,0): 15, 16, 17, 18, 19,
(4,0): 20, 21, 22, 23, 24,
(5,0): 25, 26, 27, 28, 29,
(6