Commit afc6ee04 by BellCodeEditor

save project

parent d0c19678
Showing with 9 additions and 10 deletions
......@@ -4,12 +4,12 @@ class Hero:
self.mz=mz
self.sm=sm
self.gj=gj
def one():
yase.dj=yase.dj+1
yase.sm=yase.sm+1
yase.gj=yase.gj+1
yase = Hero("亚瑟",300,20)
print("初始血量为:"yase.sm)
one()
one()
print("升级后的血量:"yase.sm)
\ No newline at end of file
def one(self):
self.dj=self.dj+1
self.sm=self.sm+1
self.gj=self.gj+1
libai = Hero("李白",240,160)
libai.one()
print("等级为:",libai.dj)
print(libai.sm)
print(libai.gj)
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