This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,5 @@
|
||||
def trapezoid(y: List[Float64], h: Float64) -> Float64:
|
||||
var total: Float64 = (y[0] + y[len(y) - 1]) / 2.0
|
||||
for i in range(1, len(y) - 1):
|
||||
total = total + y[i]
|
||||
return total * h
|
||||
@@ -0,0 +1,5 @@
|
||||
def trapezoid(y, h):
|
||||
total = (y[0] + y[len(y) - 1]) / 2.0
|
||||
for i in range(1, len(y) - 1):
|
||||
total += y[i]
|
||||
return total * h
|
||||
Reference in new issue
Block a user