Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. class User:
  2. def __init__(self, first_name, last_name, birth, gg, email):
  3. """basic information about user"""
  4. self.first_name = first_name
  5. self.last_name = last_name
  6. self.birth = birth
  7. self.gg = gg
  8. self.email = email
  9. def describe_user(self):
  10. """describe your user"""
  11. info = self.first_name + " " + self.last_name + " " + str(self.birth) + " " + str(self.gg) + " " + self.email
  12. return info.title()
  13. def greet_user(self):
  14. print("Hi! " + self.first_name.title())
  15. def increment_login_attempts(self):
  16. self.attempts += 1
  17.  
  18. wiktor = User("wiktor", "cwt", 1996, 123456, " wiktor@kds.pl")
  19. print(wiktor.describe_user())
  20. print(wiktor.greet_user())
  21. ola = User("ola", "prd", 1996, 616724, "ola@kds.pl")
  22. print(ola.describe_user())
  23. print(ola.greet_user())
  24. lena = User("lena", "kkt", 2015, 987654, "lena@kds.pl")
  25. print(lena.describe_user())
  26. print(lena.greet_user())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement