-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSecureGate Using python
More file actions
62 lines (43 loc) · 874 Bytes
/
Copy pathSecureGate Using python
File metadata and controls
62 lines (43 loc) · 874 Bytes
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
users = {}
def register():
username = input("Create username: ")
email = input("Email: ")
password = input("Password: ")
users[username] = {
"email": email,
"password": password
}
print("Registration successful")
def login():
username = input("Username: ")
password = input("Password: ")
if username in users:
if users[username]["password"] == password:
print("Login successful")
print("Welcome", username)
else:
print("Wrong password")
else:
print("User not found")
def show_users():
print("\nRegistered Users")
for user in users:
print(user)
while True:
print("""
1. Register
2. Login
3. Show Users
4. Exit
""")
choice = input("Choice: ")
if choice == "1":
register()
elif choice == "2":
login()
elif choice == "3":
show_users()
elif choice == "4":
break
else:
print("Invalid choice")