-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexp.py
39 lines (29 loc) · 1016 Bytes
/
exp.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
import datetime
from initial import InitialComponent
from cost import CostFunction
import sys
if __name__ == "__main__":
initial = InitialComponent()
cost = CostFunction()
if not initial.check_initial():
current_amount = input("Type your current amount: ")
if len(current_amount) == 0:
print("Please Enter a valid amount")
sys.exit()
else:
current_amount = current_amount.replace(",","")
if current_amount.isdigit():
initial.create_initial_setup(current_amount)
else:
print("Please Enter a valid numeric value")
sys.exit()
if not initial.check_user():
initial.create_user()
elif not initial.check_user_exist():
initial.create_user()
cost.say_hello()
while True:
usr_cmd = input("command: ")
response = cost.command(usr_cmd)
if response == False:
break