Advertisement
Guest User

Untitled

a guest
Jan 31st, 2019
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. class user():
  2.  
  3. def __init__(self, first, second, user, password, lastlogin):
  4. self.first=first
  5. self.second=second
  6. self.user=user
  7. self.password=password
  8. self.lastlogin=lastlogin
  9. self.login_attempts=0
  10. def describe_user(self):
  11. 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)
  12. def greet_user(self):
  13. print("Welcome shitface named " + self.user + " with the true name " + self.first)
  14. def increment_login_attempts(self) :
  15. self.login_attempts +=1
  16. def read_login_attempts(self):
  17. print("Number of login attempts " + str(self.login_attempts))
  18. def reset_login_attempts(self):
  19. self.login_attempts=0
  20.  
  21. class admin(user):
  22. def __init__(self, first, second, user, password, lastlogin):
  23. super().__init__(first, second, user, password, lastlogin)
  24.  
  25.  
  26. class privileges(admin):
  27. def __init__(privileg):
  28. self.privilege=' Can add/edit post and ban trolls '
  29. def show_privileges(self):
  30. print("The admin "+ self.privileg)
  31.  
  32. buttface = admin('shit','mcdonald','mcshit','22394','2 hours ago')
  33. buttface.describe_user()
  34. buttface.privileges.show_privileges()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement