Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Human():
- def __init__(self, name, age, hobby):
- self.name = name
- self.age = age
- self.hobby = hobby
- self.money = 100
- self.health = 50
- def desctibsion(self):
- all_characteristics = 'Данные:' + '\n' + 'Имя: ' + self.name + '\n' + 'Возраст: ' + str(self.age) + '\n' + \
- 'Хобби: ' + self.hobby + '\n' + 'Деньги: ' + str(self.money) + '\n' + 'Здоровье: ' + \
- str(self.health)
- print(all_characteristics)
- def go_work(self):
- print('Сходил на работу')
- self.money += 10
- def go_magazine(self):
- print('Сходил в магазин')
- self.money -=10
- def use_drug(self):
- print('Принял лекарства')
- self.health += 10
- def smoking(self):
- print('Покурил')
- self.health -= 10
Advertisement
Add Comment
Please, Sign In to add comment