Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User:
- name = ''
- email = ''
- password = ''
- login = False
- def __init__(self, name, email, password):
- self.name = name
- self.email = email
- self.password = password
- def login(self):
- email = input("Enter email: ")
- password = input("Enter password: ")
- if email == self.email and password == self.password:
- login = True
- print("Login Successful!")
- else:
- print("Login Faild!")
- def logout(self):
- login = False
- print("Logged Out!")
- def isLoggedIn(self):
- if self.login:
- return True
- else:
- return False
- def profle(self):
- if self.isLoggedIn():
- print(self.name,"-",self.email)
- else:
- print("User is not Logged in!")
- user1 = User("Adam", "adam@testmail.com","12345")
- user1.login()
- user1.profle()
- hello = input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement