Skip to content

Commit b9cc468

Browse files
authored
Add files via upload
1 parent 49a3169 commit b9cc468

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Bank Management.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import mysql.connector
2+
import time
3+
4+
login_count = 0
5+
6+
for i in range(0, 2):
7+
8+
print("\n")
9+
passwd = input("Enter the MySQL Client Password: ")
10+
conobj = mysql.connector.connect(host = 'localhost', user = 'root', password = passwd)
11+
12+
if conobj.is_connected:
13+
print("Connected Successfully")
14+
break
15+
16+
else:
17+
print("Password Entered is Incorrect\n")
18+
login_count += 1
19+
20+
if login_count == 3:
21+
print("\nPassword Entered Incorrectly 3 times")
22+
time.sleep(1)
23+
print('\nExiting Program')
24+
exit()
25+

0 commit comments

Comments
 (0)