Advertisement
1nikitas

Untitled

Apr 3rd, 2022
1,001
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. class User:
  2.     def __init__(self, name):
  3.         self.name = name
  4.  
  5.     def send_message(self, user, message):
  6.         pass
  7.  
  8.     def post(self, message):
  9.         pass
  10.  
  11.     def info(self):
  12.         return ''
  13.  
  14.     def describe(self):
  15.         print(self.name)
  16.         print(self.info)
  17.  
  18.  
  19. class Person(User):
  20.     def __init__(self, name, date):
  21.         self.name = name
  22.         self.date = date
  23.  
  24.     def info(self):
  25.         return f'Дата рождения: {self.date}'
  26.  
  27.     def subscribe(self, user):
  28.         pass
  29.  
  30.  
  31. class Community(User):
  32.     def __init__(self, name, about):
  33.         self.name = name
  34.         self.about = about
  35.  
  36.     def info(self):
  37.         return f'Описание: {self.about}'
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement