refactor: organization
This commit is contained in:
10
src/main.py
10
src/main.py
@@ -6,14 +6,14 @@ from modules.math import (
|
|||||||
from modules.probability import (
|
from modules.probability import (
|
||||||
test_probability_module
|
test_probability_module
|
||||||
)
|
)
|
||||||
|
from modules.statistics import (
|
||||||
|
test_statistics_module
|
||||||
|
)
|
||||||
from modules.strings import t_strings
|
from modules.strings import t_strings
|
||||||
|
|
||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
t_strings()
|
t_strings()
|
||||||
|
|
||||||
print(">> Math module")
|
|
||||||
# test_math_module()
|
# test_math_module()
|
||||||
print(">>>>>>>>>>>>>>>>>>>>")
|
# test_probability_module()
|
||||||
print(">> Probability module")
|
test_statistics_module()
|
||||||
test_probability_module()
|
|
||||||
print(">>>>>>>>>>>>>>>>>>>>")
|
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ def t_calculate_integral(f, init, end, symbol):
|
|||||||
return integrate(f, (symbol, init, end))
|
return integrate(f, (symbol, init, end))
|
||||||
|
|
||||||
def test_math_module():
|
def test_math_module():
|
||||||
|
print("=== Math module ===")
|
||||||
t_exponent(2,8)
|
t_exponent(2,8)
|
||||||
print(t_compound_interest(100, 20 / 100, 2, 12))
|
print(t_compound_interest(100, 20 / 100, 2, 12))
|
||||||
print(t_compound_interest_algorigthm(100, 20 / 100, 2, 12))
|
print(t_compound_interest_algorigthm(100, 20 / 100, 2, 12))
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ class Exercises:
|
|||||||
|
|
||||||
|
|
||||||
def test_probability_module():
|
def test_probability_module():
|
||||||
|
print("=== Probability module ===")
|
||||||
print(">> Binomial distribution")
|
print(">> Binomial distribution")
|
||||||
BinomialDistribution.example()
|
BinomialDistribution.example()
|
||||||
BinomialDistribution.from_scratch(0.9, 10)
|
BinomialDistribution.from_scratch(0.9, 10)
|
||||||
|
|||||||
2
src/modules/statistics.py
Normal file
2
src/modules/statistics.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
def test_statistics_module():
|
||||||
|
print("=== Statistics module ===")
|
||||||
Reference in New Issue
Block a user