Commit 7686ea28 by BellCodeEditor

save project

parent 1de94f33
Showing with 25 additions and 5 deletions
class a:
def __init__(self):
def __init__(self,name,hp,attack):
self.level=1
self.hp=300
self.attack=20
yase=a()
\ No newline at end of file
self.name=name
self.hp=hp
self.attack=attack
yase=a('yase',300,20)
def upgrade():
yase.attack = yase.attack + 4
yase.hp = yase.hp + 50
yase.level = yase.level + 1
upgrade()
print(yase.level)
print(yase.name)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment