Commit 465f51a8 by BellCodeEditor

save project

parent ff4c7c5b
Showing with 11 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.name=name
self.level=1
self.hp=hp
self.attack=attack
hjx=Hero("黄锦轩",9,1)
hmz=Hero("何民正",10,0.1)
print(hjx.level,hjx.hp,hjx.attack)
print(hmz.level,hmz.hp,hmz.attack)
\ 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