Commit 5e9f320d by BellCodeEditor

save project

parent e26eea4a
Showing with 10 additions and 4 deletions
......@@ -5,6 +5,13 @@ class Hero():
self.HP=HP
self.a=a
sb=Hero('sans',1,1)
ab=Hero('sanswd',1,1)
print('sans的HP',sb.HP)
print('sanswd的HP',ab.HP)
\ No newline at end of file
def sd_up()
sb.Lv=sb.Lv+1
sb.HP=sb.HP+0
sb.a=sb.a=0
print("初始Lv为",sb.Lv)
sb_up()
sb_up()
sb_up()
print("升级后Lv为",sb.Lv)
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