mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-25 01:04:03 +08:00
actions/checkout@v2 (#1643)
* actions/checkout@v2 https://github.com/actions/checkout/releases * fixup! Format Python code with psf/black push
This commit is contained in:

committed by
John Law

parent
1b3985837f
commit
34c808b375
@ -111,7 +111,7 @@ def simpson_integration(function, a: float, b: float, precision: int = 4) -> flo
|
||||
|
||||
for i in range(1, N_STEPS):
|
||||
a1 = a + h * i
|
||||
result += function(a1) * (4 if i%2 else 2)
|
||||
result += function(a1) * (4 if i % 2 else 2)
|
||||
|
||||
result *= h / 3
|
||||
return round(result, precision)
|
||||
|
Reference in New Issue
Block a user