Commit 6573f2fc by BellCodeEditor

save project

parent fb3bd71c
Showing with 6 additions and 8 deletions
...@@ -5,14 +5,13 @@ class i: ...@@ -5,14 +5,13 @@ class i:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.at=at self.at=at
def q(self):
self.level=self.level+1
self.hp=self.hp+50
self.at=self.at+4
y=i("亚瑟",300,20) y=i("亚瑟",300,20)
def q(): h=i("后羿",240,23)
y.level=y.level+1 q(y)
y.hp=y.hp+50
y.at=y.at+4
q()
q()
print(y.level) print(y.level)
print(y.name)
print(y.hp) print(y.hp)
print(y.at) print(y.at)
\ 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