Commit 1a7f5ab5 by BellCodeEditor

auto save

parent 8ffa2f86
Showing with 13 additions and 5 deletions
This diff is collapsed. Click to expand it.
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,attack):
self.leve=1 self.level=1
self.hp=4000 self.name=name
self.attack=180 self.hp=hp
self.attack=attack
yase=Hero() def sj():
yase.hp+=175
yase.level+=1
yase.attack+=129
yase=Hero("亞瑟",4536,180)
houyi=Hero("後羿",2981,217)
sj()
print(yase.hp) print(yase.hp)
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