Skip to content

Instantly share code, notes, and snippets.

@xeldrago
Last active May 11, 2020 13:41
Show Gist options
  • Save xeldrago/14555efdcacc91e5c6975bf070cb07ca to your computer and use it in GitHub Desktop.
Save xeldrago/14555efdcacc91e5c6975bf070cb07ca to your computer and use it in GitHub Desktop.
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