Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User:
- name = ''
- email = ''
- password = ''
- login = False
- 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 failed !")
- def logout(self):
- login = False
- print("Logged Out !")
- def isloggedin(self):
- if self.login:
- return True
- else:
- return False
- def profile(self):
- if self.isloggedin():
- print(self.name,"-",self.email)
- else:
- print("User is not loggedin !")
- user1 = User()
- user1.name = " Ifran"
- user1.email = "ifran@gmail.com"
- user1.password = "12345"
- user1.login()
- user1.profile()
- #hello = input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement