-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmontra.py
44 lines (38 loc) · 1.79 KB
/
montra.py
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
#The main file to control access to both the editions
import sys
#importing external modules
try:
import numpy as np
import pandas as pd
import tabulate as tb
import matplotlib.pyplot as plt
except ImportError:
print("Please install Required modules:\nMatplotlib\nPandas\nTabulate\nNumPy\n")
sys.exit()
#importing both the editions
import ent_montra
import dom_montra
#ascii art
print("""███ ███ ██████ ███ ██ ████████ ██████ █████
████ ████ ██ ██ ████ ██ ██ ██ ██ ██ ██
██ ████ ██ ██ ██ ██ ██ ██ ██ ██████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██████ ██ ████ ██ ██ ██ ██ ██""")
while True:
#main menu for selection of edition.
print("\nHello there! Welcome to MonTra!")
print("Which MonTra edition would you like to you use?")
choice = input("\n0. Exit\n1. Household Edition\n2. Enterprise Edition\nEnter your choice: ")
try:
choice = int(choice)
if choice == 0:
print("Goodbye!")
break
elif choice == 1:
dom_montra.d_montra()
elif choice == 2:
ent_montra.e_montra()
else:
print("Invalid selection, try again.")
except ValueError:
print("Invalid Selection, try again.") #ValueError handling to avoid crashing.