Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print ('Welcome to core manager 8.3. please log in.' Login message
- usernames = ['admin'] Login system
- passwords = ['admin']
- class Log:
- def __init__(self, username, password):
- self.username = username
- self.password = password
- print(self.username)
- print(self.password)
- if self.username in usernames:
- self.checkPass()
- else:
- self.badUser()
- def loginSuccessful(self):
- print ("Welcome, Admin!")
- def checkPass(self):
- if self.password in passwords:
- self.loginSuccessful()
- else:
- self.badPass()
- def badUser(self):
- print("Username does not match, please try again.")
- def badPass(self):
- print ("Password does not match, please try again.")
- username = input("Please enter your username: ")
- password = input("Please enter your password: ")
- login = Log(username, password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement