-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogram.py
81 lines (56 loc) · 2.22 KB
/
program.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
from mysql_account_type import account_type_table
from mysql_account import account_table
from mysql_purpose import purpose_table
from mysql_purpose_type import purpose_type_table
from mysql_status import status_table
from mysql_transaction import showcase_transaction_table, transaction_table
from date_of_transaction import extract_date
import wealth_motivation as pw
def add_funds():
"""control flow for adding a transaction
"""
account_type_id = account_type_table("account_type")
account_id = account_table("account",account_type_id)
status_id = status_table("status")
purpose_type_id = purpose_type_table("purpose_type")
purpose_id = purpose_table("purpose", purpose_type_id)
print("\namount transacted")
print("***************************************************")
transaction_amount = float(input("insert:"))
print("***************************************************")
print("transaction recorded\n")
date_of_transaction = extract_date()
transaction_table("transaction", account_id, status_id, transaction_amount, purpose_id,date_of_transaction)
showcase_transaction_table("transaction",5)
def main():
"control the flow of different elements"
correct = True
while correct:
print("\n************PESA MFUKONI***********")
print("1) ADD FUNDS\n"
"2) VIEW MONEY OUT\n"
"3) VIEW MONEY IN\n"
"4) THE NET WORTH CURVE\n"
"5) EXIT")
print("************************************")
user_selection = int(input("select: "))
if user_selection == 1:
add_funds()
elif user_selection == 2:
print("design in progress, It will be available soon")
pass
elif user_selection == 3:
print("design in progress, It will be available soon")
pass
elif user_selection == 4:
print("design in progress, It will be available soon")
pass
elif user_selection == 5:
quote = pw.motivation()
print(quote)
print("Thank you")
correct = False
else:
print("Wrong input")
if __name__ == "__main__":
main()