Commit e0383e45 by BellCodeEditor

save project

parent 20fc69a7
Showing with 11 additions and 9 deletions
......@@ -4,13 +4,16 @@ class A:
self.level=level
self.hp=hp
self.attack=attack
b=A("nrt",1,300,6)
def a():
b.level=b.level+1
b.hp=b.hp+200
b.attack=b.attack+200
print(b.level)
a()
a()
\ No newline at end of file
def a(self):
self.level=self.level+1
self.hp=self.hp+200
self.attack=self.attack+200
a=A(1,2,3,4)
print(a.attack)
a.a()
print(a.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