Last active
May 11, 2020 13:41
-
-
Save xeldrago/14555efdcacc91e5c6975bf070cb07ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
users = {'createLogin' : [],'createPassw' : []} | |
status = "" | |
def displayMenu(): | |
global status | |
global users | |
status = input("are u known y/n? press q to get out---") | |
if status == "y": | |
oldUser() | |
elif status == "n": | |
newUser() | |
elif status == "q": | |
return | |
else: | |
print("u do not belong here") | |
def newUser(): | |
print("before creating your new account,give us your new user name") | |
logingname=input("here:") | |
if logingname in users.get('createLogin','none'): | |
print("\nit already existing ,choose another!\n") | |
else: | |
login1=input("create login name:") | |
pass1=input("Create password: ") | |
users['createLogin'].insert(len(users['createLogin']),login1) | |
users['createPassw'].insert(len(users['createPassw']),pass1) | |
print("\nUser created\n") | |
def oldUser(): | |
login = input("Enter login name: ") | |
passw = input("Enter password: ") | |
if login in users['createLogin'] and passw in users['createPassw']: | |
print("\nyour in, now go hafun exiting\n") | |
else: | |
print("\nur not known here jus get out\n") | |
while status != "q": | |
displayMenu() | |
#break | |
print("ur out of the login system ,die") | |
except: | |
print("invalid") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment