Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class user():
- def __init__(self, first, second, user, password, lastlogin):
- self.first=first
- self.second=second
- self.user=user
- self.password=password
- self.lastlogin=lastlogin
- self.login_attempts=0
- def describe_user(self):
- print("Username is " + self.user + " Password is " + self.password + " Last Login Date is " + self.lastlogin + " First name is " + self.first + " Last name is " + self.second)
- def greet_user(self):
- print("Welcome shitface named " + self.user + " with the true name " + self.first)
- def increment_login_attempts(self) :
- self.login_attempts +=1
- def read_login_attempts(self):
- print("Number of login attempts " + str(self.login_attempts))
- def reset_login_attempts(self):
- self.login_attempts=0
- class admin(user):
- def __init__(self, first, second, user, password, lastlogin):
- super().__init__(first, second, user, password, lastlogin)
- class privileges(admin):
- def __init__(privileg):
- self.privilege=' Can add/edit post and ban trolls '
- def show_privileges(self):
- print("The admin "+ self.privileg)
- buttface = admin('shit','mcdonald','mcshit','22394','2 hours ago')
- buttface.describe_user()
- buttface.privileges.show_privileges()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement