Commit 9241eafd by BellCodeEditor

save project

parent 220113fe
Showing with 8 additions and 14 deletions
class Hero:
def __init__(self,name,hp,attacr):
self.level=1
self.name=name
self.hp=hp
self.attacr=attacr
def fff(self):
self.level=self.level+1
self.hp=self.hp+50
self.attacr=self.attacr+4
yase=Hero("yase",3,100) yase=Hero("yase",3,100)
hy=Hero("hy",2,40) hy=Hero("hy",2,40)
yase.fff() print(hy.hp)yase=Hero("yase",3,100)
hy.fff() hy=Hero("hy",2,40)
print(hy.attacr) print(hy.hp)yase=Hero("yase",3,100)
\ No newline at end of file hy=Hero("hy",2,40)
print(hy.hp)yase=Hero("yase",3,100)
hy=Hero("hy",2,40)
print(hy.hp)永远是去耦上图为人陪分为反思的是的比赛首发的绯闻 个人规划然后就搞不好热后人憼个废人few风格热高热二分但是vvdsvds工人房苟富贵大富大贵vdfdv购房人g'v'b're
\ 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