Commit 2866de85 by BellCodeEditor

save project

parent 61bc4a2e
Showing with 7 additions and 8 deletions
......@@ -4,11 +4,11 @@ class Hero:
self.hp=hp
self.attack=attack
self.name=name
def a(self):
self.level=self.level+1
self.hp=self.hp+20
self.attack=self.attack+5
yase=Hero("yase",300,40)
print(yase.name)
def a():
yase.level=yase.level+1
yase.hp=yase.hp+20
yase.attack=yase.attack+5
a()
print(yase.hp)
\ No newline at end of file
print(yase.hp)
yase.a()
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