Repository navigation
Expand file tree
/
Copy pathmain.py
More file actions
47 lines (43 loc) · 1.42 KB
/
Copy pathmain.py
File metadata and controls
47 lines (43 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from menu import get_menu_choice
from calculators.calculate_int import run_int
from calculators.calculate_pi import run_pi
from calculators.calculuate_variance import run_variance
from calculators.calculate_mcmc_bayes import run_mcmc
from calculators.calculate_pde_sde import run_pde_sde
from calculators.calculate_sequential import run_sequential
from calculators.calculate_rare_events import run_rare
from calculators.calculate_european_options import run_european
def main() -> None:
while True:
sim_choice: int = get_menu_choice()
if sim_choice == 9:
print("------------------------------------------------------------------------\nExiting the program. Thank you!")
break
elif sim_choice == 1:
run_int()
print()
elif sim_choice == 2:
run_pi()
print()
elif sim_choice == 3:
run_variance()
print()
elif sim_choice == 4:
run_mcmc()
print()
elif sim_choice == 5:
run_pde_sde()
print()
elif sim_choice == 6:
run_sequential()
print()
elif sim_choice == 7:
run_rare()
print()
elif sim_choice == 8:
run_european()
print()
else:
print("Invalid choice. Please select a number between 1 and 9.")
if __name__ == "__main__":
main()