Commit 5cf58be8 by BellCodeEditor

save project

parent c1bf630c
Showing with 8 additions and 6 deletions
......@@ -3,10 +3,13 @@ class Hero:
self.level = 1
self.hp = 300
self.attack = 20
yase = Hero(300,20)
houyi = Hero(240,23)
def upd():
yase.hp += 50
yase.attack += 4
upd()
upd()
print('yase的血量值为:',yase.hp)
print('houyi的血量值为:',houyi.hp)
print('yase的攻击值为:',houyi.attack)
print('houyi的攻击值为:',houyi.attack)
\ No newline at end of file
print('yase的攻击值为:',yase.attack)
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