Commit 54be71c6 by BellCodeEditor

save project

parent 781f8810
Showing with 21 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack,level):
self.attack = attack
self.hp = hp
self.level = level
self.name = name
yase = Hero("yase",4500,245,1)
houyi = Hero("houyi",3100,300,1)
def wsnd():
yase.level = yase.level + 1
yase.hp = yase.hp + 400
yase.attack = yase.attack + 80
wsnd()
wsnd()
wsnd()
print("亚瑟的血量",yase.hp)
print("后羿的血量",houyi.hp)
\ 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