-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
164 lines (147 loc) · 3.59 KB
/
main.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
import os
import function as f
from datetime import datetime
import time
import money as m
import mysql.connector
connection = mysql.connector.connect(user = 'root', database = 'users', password = 'GIZ!MONEA2020!')
host = "127.0.0.1"
username = "root"
password = "GIZ!MONEA2020!"
database = "users"
def startup():
print(".")
time.sleep(1)
print(".")
time.sleep(1)
print(".")
time.sleep(2)
os.system('cls')
print("Please type 'Hi' when you're ready to begin")
hi = input("You: ")
if hi == 'Hi' or hi == 'hi' or hi == 'HI':
os.system('cls')
print('Bot: Hello! Welcome to the official Peoples Banker ChatBot!')
print('Can you type in your name?')
name = input('You: ')
print('Bot: Hello ' + name + '!')
print('Bot: Are you ready to start?: (y/n)')
ready = input('You: ')
if ready == 'y':
print('Bot: Great! Lets get started!')
time.sleep(1)
os.system('cls')
print('Bot: Here are your options:')
options()
elif ready == 'n':
print("Ok! Goodbye!")
exit()
else:
print("Bot:SyStEM ShUttIng DoWN")
time.sleep(2)
os.system('cls')
exit()
else:
print("Invalid entry")
print("Premature exit")
exit()
def options():
print('1. Credit Card Account')
print('2. Savings Account')
print('3. Bank Account')
print('4. Withdraw/Deposit')
print('4. Exit')
print("Bot: Type in which option you want to select.")
choice = int(input("You: "))
if choice == 1:
os.system('cls')
yes = input("Did you already create an account?(y/n): ")
if yes == 'y':
f.login()
if yes == 'n':
print("Please enter in your age: ")
age = int(input())
if age >= 18:
f.signup()
f.per_info()
f.secure()
f.ok()
credit = True
options()
elif age <= 17:
f.joint()
f.per_info()
f.secure()
f.ok()
credit = True
options()
if choice == 2:
os.system('cls')
yes = input("Did you already create an account?(y/n): ")
if yes == 'y':
f.login()
if yes == 'n':
print("Please enter in your age: ")
age = int(input())
if age >= 18:
f.signup()
os.system('cls')
f.per_info()
os.system('cls')
f.secure()
os.system('cls')
f.ok()
saving = True
os.system('cls')
options()
elif age <= 17:
f.joint()
os.system('cls')
f.per_info()
os.system('cls')
f.secure()
os.system('cls')
f.ok()
saving = True
os.system('cls')
options()
if choice == 3:
os.system('cls')
yes = input("Did you already create an account?(y/n): ")
if yes == 'y':
f.login()
if yes == 'n':
print("Please enter in your age: ")
age = int(input())
if age >= 18:
f.signup()
os.system('cls')
f.per_info()
os.system('cls')
f.secure()
os.system('cls')
f.ok()
bank = True
os.system('cls')
options()
elif age <= 17:
f.joint()
os.system('cls')
f.per_info()
os.system('cls')
f.secure()
os.system('cls')
f.ok()
bank = True
os.system('cls')
options()
if choice == 4:
m.dep_with()
options()
elif choice == 5:
print("Thank you for using the official Peoples ChatBot!")
print("Bye!!!")
time.sleep(3)
os.system('cls')
#startup()
#options()