Commit 26f5d8fb by BellCodeEditor

save project

parent 8afe2757
Showing with 11 additions and 12 deletions
......@@ -4,17 +4,16 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def att(self):
self.level = self.level + 1
self.hp=self.hp + 20
self.attack=self.attack+20
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
k=Hero('K',5600,199)
# print(yase.attack)
# print(hy.attack)
# print(k.attack)
def a():
hy.level = hy.level + 1
hy.hp=hy.hp + 20
# print(hy.)
hy.attack=hy.attack+20
a()
print(hy.hp)
yase.att()
print(yase.hp)
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