Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import sys
- def Signup():
- print("Welcome to (Beta)pgczh mydbs mi")
- print(
- "Assuming this is your first time on this program,(I don't know how to tell or not) we will begin with the sign-up")
- Username = input("Enter in your desired username")
- print("Now time for your password")
- Password = input("Enter in your desired password")
- f = open("LoginInfo.txt", "w")
- f.write(Password + ":" + Username)
- f.close()
- return Password, Username
- def Login():
- tries = 3
- NameInput = input("Enter your username")
- while NameInput != Username:
- print("Incorrect Username, please try again")
- NameInput = input("Enter your username")
- while tries >= 0:
- Input = input("Enter Your Password")
- if Input == (Password):
- Status = "Access Granted"
- print('Access Granted')
- return Status
- else:
- print('Access Denied, please try again')
- print("You have: " + str(tries) + " attempts left")
- tries -= 1
- if tries == 0:
- print("Your are out of attempts, Program now closing")
- time.sleep(5)
- exit()
- def Content():
- if Status == "Access Granted":
- print("I haven't really gotten this far yet soooo... ye thats it")
- Password, Username = Signup()
- Status = Login()
- Content()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement