Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- login = {"Admin":"Pass", "Standard":"User"}
- while 1:
- while 1:
- User = raw_input("Hello, what is your Username? ")
- if User in login:
- Pass = raw_input("Hello " + User + " what is your Password? ")
- if login[User] == Pass:
- print"Welcome " + User
- break
- else:
- print"Attempt failed"
- else:
- answer = raw_input("It seems you don't have an account, would you like to make one? Y/n ")
- if answer == "y":
- NewU = raw_input("New Username is: ")
- if NewU in login.keys():
- print"No go"
- else:
- NewP = raw_input("New Password is: ")
- login[NewU] = NewP
- print login
- if answer == "n":
- print"Well fuck you then"
- raw_input("Press enter")
- sys.exit()
- else:
- print"Die"
- while 1:
- a = raw_input("""What would you like to do next?
- d - Delete profile
- c - Create another profile
- s - Show all values of login
- o - Sign out
- """)
- if a == "d":
- del login[User]
- print login
- break
- if a == "c":
- NewU = raw_input("New Username: ")
- if NewU in login.keys():
- print("Sorry, name is taken. Try again.")
- pass
- else:
- NewP = raw_input("New Password: ")
- login[NewU] = NewP
- if a == "s":
- print login
- if a == "o":
- break
Add Comment
Please, Sign In to add comment