Skip to content

Commit f9b6ab0

Browse files
fix: memperbaiki CodeQL
1 parent 2047669 commit f9b6ab0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

math/rieman_integral.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def rieman_integral(fungsiHitung: Callable[[float], float],
3131
x_i = left + 0.5 * delta_x
3232
else:
3333
raise ValueError("masukkan approx benar")
34-
print("type fungsiHitung:", type(fungsiHitung),"callable",callable(fungsiHitung))
34+
3535
sigma += fungsiHitung(x_i)
3636

3737
return delta_x * sigma
@@ -42,6 +42,11 @@ def main(args=None):
4242

4343
doctest.testmod()
4444

45+
# persamaan x
46+
def f(x):
47+
return x
48+
print(rieman_integral(f, 0, 1, 1, "tengah")) # 0.5
49+
4550
# persamaan 4/(1+x^2)
4651
def g(x):
4752
return (4) / (1 + x**2)

0 commit comments

Comments
 (0)