Commit 83d436f0 by BellCodeEditor

save project

parent 1b073c77
Showing with 11 additions and 6 deletions
class Hero: class Hero:
def if _init_(self): def if _init_(self,n,hp,att):
self.level = 1 self.level = 1
self.att = 20 self.name=n
self.hp= 300 self.att = att
yase=Hero() self.hp= hp
yase=Hero('亚瑟',300,20)
print(yase.hp) print(yase.hp)
print(yase.att)
......
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