Commit feb8cef1 by BellCodeEditor

save project

parent 7e1c1b90
Showing with 7 additions and 3 deletions
class hero: """
def __init__(self,name,hp,attack): def __init__(self,name,hp,attack):
self.level = 10 self.level = 10
self.hp = 99999 self.hp = 99999
...@@ -6,4 +6,9 @@ class hero: ...@@ -6,4 +6,9 @@ class hero:
lubenwei = hero("卢本伟",99999,999) lubenwei = hero("卢本伟",99999,999)
sunxaiochuan = hero("孙笑川",99999,999) sunxaiochuan = hero("孙笑川",99999,999)
print("卢本伟的血量为:",lubenwei.hp) print("卢本伟的血量为:",lubenwei.hp)
print("孙笑川的血量为:",sunxaiochuan.hp) print("孙笑川的血量为:",sunxaiochuan.hp)的攻击力为:",yase.attack)
\ No newline at end of file """
def upgrade():
lubenwei.level=lubenwei.level+1
lubenwei.hp=lubenwei.hp+99999
lubenwei.attack=lubenwei.hpattack+999
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