Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- name = input("What's name of your character")
- class Hero:
- cash = 0
- def __init__(self, name):
- self.name = name
- self.health = 100
- self.damage = 1
- @classmethod
- def work(cls):
- salary = random.randint(1, 100)
- cls.cash += salary
- hero = Hero(name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement