Commit bbdc5757 by BellCodeEditor

save project

parent 8772bf0d
Showing with 8 additions and 7 deletions
......@@ -4,14 +4,14 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
yase = Hero("yase",300,20)
houyi = Hero("houyi",240,23)
def ut(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
def ut(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
yase = Hero("yase",300,20)
houyi = Hero("houyi",240,23)
ut()
yase.ut()
print(yase.hp,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