Commit bd580ee4 by BellCodeEditor

save project

parent 97fbe3f6
Showing with 9 additions and 4 deletions
......@@ -4,10 +4,14 @@ class TheFirstDemo:
self.hp=hp
self.attack=attack
self.name=name
y1=TheFirstDemo(300,20,"yese")
y2=TheFirstDemo(250,23,"houyi")
print("亚瑟的属性值为:","血量:",y1.hp,"攻击力:",y1.attack)
print("后羿的属性值为:","血量:",y2.hp,"攻击力:",y2.attack)
yy=TheFirstDemo(300,20,"yese")
yyy=TheFirstDemo(250,23,"houyi")
print("亚瑟的属性值为:","血量:",yy.hp,"攻击力:",yy.attack)
print("后羿的属性值为:","血量:",yyy.hp,"攻击力:",yyy.attack)
def upgrade():
yy.level=yy.level+1
yy.hp=yy.hp+50
yy.attack=yy.attack+4
\ 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