Commit 7516c659 by BellCodeEditor

save project

parent ca5eacdf
Showing with 6 additions and 4 deletions
class Hero:
def__init__(self,name,hp,attack):
def __init__(self,name,hp,attack):
self.level=114514
self.name=name
self.hp=hp
self.attack
self.attack=attack
yase=Hero("垭瑟",300,20)
def upgrade():
......@@ -12,4 +12,6 @@ def upgrade():
yase.attack=yase.attack+4
upgrade()
upgrade()
\ No newline at end of file
upgrade()
print("垭瑟的血量为",yase.hp)
print("垭瑟的攻击力为",yase.attack)
\ 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