Skip to content

Commit 242b208

Browse files
committed
fix: change function name in calls
1 parent 2409e25 commit 242b208

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

maths/trapezoidal_rule.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ def trapezoidal_rule(boundary, steps):
1515
:param steps: The number of steps (intervals) used in the approximation
1616
:return: The numerical approximation of the integral
1717
18-
>>> abs(method_1([0, 1], 10) - 0.33333) < 0.01
18+
>>> abs(trapezoidal_rule([0, 1], 10) - 0.33333) < 0.01
1919
True
2020
21-
>>> abs(method_1([0, 1], 100) - 0.33333) < 0.01
21+
>>> abs(trapezoidal_rule([0, 1], 100) - 0.33333) < 0.01
2222
True
2323
24-
>>> abs(method_1([0, 2], 1000) - 2.66667) < 0.01
24+
>>> abs(trapezoidal_rule([0, 2], 1000) - 2.66667) < 0.01
2525
True
2626
27-
>>> abs(method_1([1, 2], 1000) - 2.33333) < 0.01
27+
>>> abs(trapezoidal_rule([1, 2], 1000) - 2.33333) < 0.01
2828
True
2929
"""
3030
h = (boundary[1] - boundary[0]) / steps
@@ -94,7 +94,7 @@ def main():
9494
b = 1.0
9595
steps = 10.0
9696
boundary = [a, b]
97-
y = method_1(boundary, steps)
97+
y = trapezoidal_rule(boundary, steps)
9898
print(f"y = {y}")
9999

100100

0 commit comments

Comments
 (0)