Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Welcome...")
- welcome = input("Do you have an acount? y/n: ")
- if welcome == "n":
- while True:
- username = input("Enter a username:")
- password = input("Enter a password:")
- password1 = input("Confirm password:")
- if password == password1:
- file = open(username+".txt", "w")
- file.write(username+":"+password)
- file.close()
- welcome = "y"
- break
- print("Passwords do NOT match!")
- if welcome == "y":
- while True:
- login1 = input("Login:")
- login2 = input("Password:")
- file = open(login1+".txt", "r")
- data = file.readline()
- file.close()
- if data == login1+":"+login2:
- print("Welcome")
- break
- print("Incorrect username or password.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement